5

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

  • 1
    can you connect to postgres from the odoo machine – Charif DZ Apr 11 '17 at 15:07
  • Just to make sure: you're starting Odoo including -c /path/to/config? In your case /opt/odoo/odoo10.0/odoo-bin -c /etc/odoo.conf otherwise your config won't be loaded. – coreuter Apr 16 '18 at 12:02

2 Answers2

1

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

Graham
  • 7,431
  • 18
  • 59
  • 84
0

You need to change in pg_hba.conf file

In IPV4 section , you need to replace 1 line with below change.

host    all     all    0.0.0.0/0    trust

This is for first line in IPV4 section.

After Restart PostgreSQL , you can connect.

kajal siyat
  • 70
  • 1
  • 10