PostgreSQL – Allow Database Connection From Remote Machine

OS: Ubuntu 8.04
PostgreSQL: 8.3

By default, PostgreSQL database connection only listens to localhost. If you want to connect to a PostgreSQL database with another machine, 2 files needs to be modified.

1. Update /etc/postgresql/8.3/main/postgresql.conf. Set the listen_addresses from localhost to *

2. Update /etc/postgresql/8.3/main/pg_hba.conf. Add the following lines

  • host    all    all    md5
  • host    all    all    md5

3. Now, IP as well as 192.168.137.* can connect to the PostgreSQL Database.

I would also like share a database tool which is called DBVisualizer. It is a java based software and so it can be run on any OS to access a wide range of different databases.
DBVisualizer Homepage

Enjoy =)

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.