# How to change postgresql tryton database user password

**URL:** https://discuss.tryton.org/t/how-to-change-postgresql-tryton-database-user-password/5830
**Category:** System Administrator
**Created:** [January 15, 2023, 9:45pm UTC](https://discuss.tryton.org/t/how-to-change-postgresql-tryton-database-user-password/5830 "2023-01-15T21:45:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [January 15, 2023, 9:45pm UTC](https://discuss.tryton.org/t/how-to-change-postgresql-tryton-database-user-password/5830/1 "2023-01-15T21:45:22Z")

</div>

Hi all, I changed the PostgreSQL Tryton user password using the psql prompt and changed the password in trytond.conf, but trytond can’t seem to connect to the PostgreSQL server. However, I can connect remotely using the new password from a laptop with pgAdmin 4.

When I first installed PostgreSQL, I used a weak password thinking I would never allow remote connections. However, now I want to use pgAdmin 4 remotely to explore the tryton database, I changed the configuration to allow remote connections and now want to change the password to something more secure (eventually I want to use an ssh key, but a secure password will be good enough for now)

I changed the password back to the old password, edited trytond.conf back to the old password, and trytond connects to the database again (and I can login from pgAdmin 4 with the old password).

I used psql on the server to change the password:

```auto
dale@starlord:~ % sudo su - postgres
$ psql
psql (14.6)
Type "help" for help.

postgres=# ALTER USER tryton WITH PASSWORD 'password';
ALTER ROLE
postgres=#

```

I didn’t restart postgresql after changing the password, but I did kill and restarted trytond after editing trytond.conf.

Can anyone point out what I’m missing?

Thanks,  
Dale

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 15, 2023, 10:49pm UTC](https://discuss.tryton.org/t/how-to-change-postgresql-tryton-database-user-password/5830/2 "2023-01-15T22:49:27Z")

</div>

Probably that your new password contains special char or `@`, if it is the case you must [encode](https://en.wikipedia.org/wiki/Percent-encoding) it for the URI.

---

<div class="post-metadata">

### Author: ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)
#### Post date: [January 16, 2023, 2:24am UTC](https://discuss.tryton.org/t/how-to-change-postgresql-tryton-database-user-password/5830/3 "2023-01-16T02:24:29Z")

</div>

Thanks @ced. Changed password again without using special characters and trytond connects again.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [February 15, 2023, 2:24am UTC](https://discuss.tryton.org/t/how-to-change-postgresql-tryton-database-user-password/5830/4 "2023-02-15T02:24:40Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
