United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
Release Found: Red Hat Enterprise Linux 3
Symptom:
The PostgreSQL service has been started. When clients attempt to connect to the server, they receive an error message similar to:
psql: could not connect to server: Connection refused Is the server running on host host.domain.com and accepting TCP/IP connections on port 5432?
Solution:
By default, the PostgreSQL service only allows connections to the database from the local machine. To enable clients to connect from different hosts, first add the following line to the bottom of the /var/lib/pgsql/data/pg_hba.conf file:
host all all ip_address subnet_mask trust
replacing ip_address and subnet_mask to reflect the network IP address range of the clients.
Add the following line to the /var/lib/pgsql/postgresql.conf file:
tcpip_socket = true
Restart the service with:
# service rhdb restart
Clients should now be able to connect to the PostgreSQL service over the default port (5432).