Thread: how to connect remotely?
hi.
how can i get connection to the pg database that lies on othe machine??
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
how can i get connection to the pg database that lies on othe machine??
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
Hi Yunush,
Look at the docs:
http://jdbc.postgresql.org/documentation/81/connect.html
I'm assuming your wishing to connect via java.
Cheers
Noel
Yunush Mulla wrote:
Look at the docs:
http://jdbc.postgresql.org/documentation/81/connect.html
I'm assuming your wishing to connect via java.
Cheers
Noel
Yunush Mulla wrote:
hi.
how can i get connection to the pg database that lies on othe machine??
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
Attachment
Yunush Mulla wrote: > hi. > how can i get connection to the pg database that lies on othe machine?? to Noel's posting, I'd add you need to make sure the postgres server is configured to accept and authenticate network connections from external hosts. this isn't the default. its controlled by $PGDATA/pg_hba.conf on the postgres server. I usually add the line host all all 0.0.0.0 0.0.0.0 md5 which says to accept network connections from all IPs and authenticate via MD5 encrypted passwords. ALTER USER 'username' WITH ENCRYPTED PASSWORD 'password'; if the server is on a public internet connection, and the client is on another internet connection, you may wish to use some form of secure transport tunneling instead of allowing direct PGSQL connects over TCP. options include ssh tunnels, regular VPNs (OpenVPN is particularlly easy to use), and integrated SSL (I do not know how well this is supported in pgsql-jdbc)