Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Peer authentication failed for user "odoo"

I'm on Odoo 9, I have an issue when lunching odoo server $odoo.py -r odoo -w password, the localhost:8069 doesn't load and I get an error on terminal "Peer authentication failed for user "odoo"".

I already created a user "odoo" on postgres.
When lunching $odoo.py I can load the odoo page on browser but I can't create database (as default user).

It was working and i already created database but when I logged out I couldn't connect to my database account anymore.

Any ideas ?

like image 460
Nero Ouali Avatar asked Dec 01 '22 13:12

Nero Ouali


1 Answers

You need to change your pg_hba.conf configuration. This error means that you are using peer authentication, so you need to change it for md5 or something that suits you.

You can find more information here: http://www.postgresql.org/docs/9.4/static/auth-pg-hba-conf.html

If you are connecting locally you will need to change the following entrance from

local all all peer

to something like this :

local all all md5

like image 139
lsilva Avatar answered Dec 06 '22 09:12

lsilva