From linux command prompt:
su - postgres
psql -d template1 -U postgres
alter user postgres with password 'postgres_password';
ctrl+d
Showing posts with label PostgreSQL. Show all posts
Showing posts with label PostgreSQL. Show all posts
Saturday, June 14, 2008
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. 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
eg. host all all 192.168.2.0/24 trust
1.4. Restart PostgreSQL
/etc/init.d/postgresql-8.3
Yes! That works fine!
Subscribe to:
Posts (Atom)