Sunday, June 8, 2008

Enable PostgreSQL access through the Network

Most wanted question:
1. How do I access PostgreSQL through the network?
1.1. Open postgresql.conf (in Ubuntu 8.04 at /etc/postgresql/8.3/main/postgresql.conf) and change listen_addresses = 'localhost' to listen_addresses = '*'.
1.2. Uncomment password_encryption = on.
1.3. Open /etc/postgresql/8.3/main/pg_hba.conf
host all all / trust
eg. host all all 192.168.2.0/24 trust
1.4. Restart PostgreSQL
/etc/init.d/postgresql-8.3

Yes! That works fine!

1 comment:

Anonymous said...

host all all / trust <-- Does this mean wide open?