问题
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 ?
回答1:
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
回答2:
This helped me.
- sudo nano /etc/postgresql/9.3/main/pg_hba.conf
then add
- local all odoo trust
then restart postgres
- sudo service postgresql restart
回答3:
I know this is an old post but upper results are not working for me.Well this will definitely work. You can see this django link.
Apparently there are multiple ways for authentication with postgresql.
So,if your Postgresql user is different from your linux user then one easy way is to add --db_host
to localhost
which is "127.0.0.1"
:
.odoo-bin -r "pg_user" -w 'pg_pass' --db_host "127.0.0.1"
If you feel any problem in this,Tell me i will elaburate further
来源:https://stackoverflow.com/questions/37193143/peer-authentication-failed-for-user-odoo