how to connect to another database wich is not on locallhost with server?

Asked by nima

i would like to know if i can install postresql on another computer and connect to that database with openerp server.i though i could first install another postresql on my machine then make a remote connection.after that i can connect server to locallhost postresql which is also connected to another postresql server which is remote.
but this is not the efficient way i think. what is ur idea?
thank u

Question information

English Edit question
Odoo Server (MOVED TO GITHUB) Edit question
No assignee Edit question
Solved by:
Anders Wallenquist
Last query:
Last reply:
Revision history for this message
Anup(SerpentCS) (anup-serpent) said :

Hello Nima,

   You can definitely connect to other remote sever by giving the parameters server ip or domain in the Sever and the port number in the Port when you login.

Hope this helps.


Revision history for this message
Best Anders Wallenquist (aw) said :

If you want openerp-server and the postgres-database to run on two servers, you change host in the /etc/openerp-server.conf-file.

# Specify the database user name (default None).
db_user = openerp

# Specify the database password for db_user (default None).
db_password = secret_password

# Specify the database host (default localhost).
db_host =

# Specify the database port (default None).
db_port = 5432

Dont forget to update /etc/postgresql/8.4/main/pg_hba.conf your remote machine

I dont understand your concept with several instances of postgres-server on your server. Are you interested in redundancy and replication or do you want to integrate with other systems that need another version of postgres?

If you dont want your local openerp-server to connect directly to the remote postgres-server, you can tunnel a local port thru ssh to the remote machine.

Revision history for this message
nima (0.5a) said :

thank you anders .u helped me alot and i think i can figure out the rest.
i will update these answers for future use after i am done.

Revision history for this message
nima (0.5a) said :

Thanks Anders Wallenquist, that solved my question.