searchforsolutions

Just another WordPress.com site

Connect pgadmin to remote PGSQL DB Server


It is actually a 3 step process to connect to a PostgreSQL server remotely through pgAdmin3.

You have to make PostgreSQL listening for remote incoming TCP connections because the default settings allow to listen only for connections on the loopback interface. To be able to reach the server remotely you have to add the following line into the file/etc/postgresql/8.4/main/postgresql.conf:

listen_addresses = ‘*’

PostgreSQL by default refuses all connections it receives from any remote address, you have to relax these rules by adding this line to /etc/postgresql/8.4/main/pg_hba.conf:

host all all 0.0.0.0/0 md5

This is an access control rule that let anybody login in from any address if he can provide a valid password (the md5 keyword). You can use needed network/mask instead of 0.0.0.0/0 .

When you have applied these modifications to your configuration files you need to restart PostgreSQL server. Now it is possible to login to your server remotely, using the username and password.

Advertisements

One response to “Connect pgadmin to remote PGSQL DB Server

  1. nicola August 3, 2013 at 6:44 am

    Not so far I have found new cool tool to work with postgresql – Valentina Studio. Its free edition can do things more than many commercial tools!!
    I very recommend check it. http://www.valentina-db.com/en/valentina-studio-overview

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: