I got a tiny problem regarding connection to my server. What should we do when this message appears in front of you?
I've done several changes in the pg_hba.conf entry but yet to succeed. Any careless mistake from my side?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Assuming you network is secure:
# Allow a user from host 192.168.0.100 to connect to database # "postgres" if the user's password is correctly supplied. # # TYPE DATABASE USER IP-ADDRESS METHOD host postgres all 192.168.0.100 md5
If you make any changes to the configuration files (most notably
pg_hba.conf), you need to signal the database server to reload. If your database server is on a Windows computer, this is likely in the start menu:
Start > PostgreSQL 9.0 > Reload Configuration
or if it is on a POSIX system (Linux, Mac OS X, etc.), the direct way is with pg_ctl reload [-s] [-D datadir], or some other convenient service wrapper, e.g. if you install via YUM from http://www.pgrpms.org/:
service postgresql-9.0 reload
The result from either Windows or POSIX reload should show a helpful message, like:
If there are problems with your
pg_hba.conf file, they should appear here.
Besides the pg_hba.conf settings, you may want to look at listen_addresses from your postgresql.conf file.
I went through similar problem. I was able to fix it by editing the pg_hba.config file and adding another entry immediately after the default one for the remote machine ipaddress range. I basically copied the default one and just changed the database, user, CIDR-ADDRESS and METHOD information. I reloaded the config file from start menu (start/postgres x.x/reload configuration). This solved my problem. like this:
host all all *.0.0.*/32 trust (default one)
host zigag gisuser 172.05.003.12/32 trust