Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect Odoo with postgres (which is running on other server)

I want to connect odoo 10 with the postgresql (which is running on other server). Is it possible ? If, yes! then please do help me out by posting step by step procedure or any sort of tutorial link (because I'm beginner). For now, I'm using odoo10 and postgresql-9.6 For different servers I'm using two different virtual machines (one is for odoo & other is for postgresql)

Here, I'm using two virtual machines 216.200.116.8 (for odoo) & 216.200.116.174 (for postgresql). I'm able to access postgresql from 216.200.116.8 remotely.

Here is my /etc/odoo.conf

enter image description here

Here is my /etc/postgresql/9.6/main/postgresql.conf

enter image description here

Here is my /etc/postgresql/9.6/main/pg_hba.conf

enter image description here

After everything is configured I'm running odoo server from /opt/odoo/odoo10.0/odoo-bin

I've encountered this error! The detailed error says:

enter image description here

enter image description here

Odoo ver : 10 & postgresql ver : 9.6

Database User :postgres

password for postgres: passwd

Help needed! Thanks in Advance

like image 971
Sai Teja Chowderpally Avatar asked Nov 09 '22 00:11

Sai Teja Chowderpally


1 Answers

If I am not mistaken, you must change the user in the database, odoo doesn't allow "postgres" as the user, you must create an "odoo user" to connect the application to the database like this:

db_user: odoo
db_password: yourpassword

Then in the postgres.conf file you must change this line:

listen_adresses = 'localhost'

I can't remember if something must be changed in the .hba

like image 196
Luis Contreras Avatar answered Nov 15 '22 06:11

Luis Contreras