Reputation: 31
I was trying to change PostgreSQL database user role password from 'admin' to 'mypassword' in odoo-10. I've tried ALTER ROLE "odoo" WITH PASSWORD 'mypassword';
in postgres and restarted postgresql service.
But it is not working. When i start odoo server again it shows error like FATAL: password authentication failed for user "odoo" and It is working fine if I change this password back to 'admin'. I've tried of making corresponding changes in both "/etc/odoo.cof" and "/odoo/tools/config.py" and it does'nt solve my issue too.
Is there anything else that i missed to try ? Hope you'll help me to fix this issue.
Thanks in advance!!
Upvotes: 1
Views: 15643
Reputation: 1918
Try this single line:
sudo -u postgres psql -c "ALTER USER <user> WITH ENCRYPTED PASSWORD '<password>';"
replace <user>
and <password>
with corresponding data.
Upvotes: 3
Reputation: 69
Try this:
$sudo -u postgres psql database_name
$ALTER USER postgres with encrypted password 'ur password';
Upvotes: 6