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

Asked by nima

hi,
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

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

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.

Thanks.

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

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 = my.postgres-server.com

# 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 :
#3

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 :
#4

Thanks Anders Wallenquist, that solved my question.