no pg_hba.conf entry for host "", user "postgres", database "postgres"

When I try to establish a connection to my postgresql database server from my windows machine through pgAdminIII I got this error. 
no pg_hba.conf entry for host “”, user “postgres”, database “postgres”
For every host we should have an entry in server side configuration file pg_hba.conf for host authentication. This is located in the data directory.

cat pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all              md5

In the Address filed I made entry with 255/8, to make all the hosts in the “192.9.1.” series will be able to connect to my server. If you want only one specific address, you can make only one ip address entry , as we follow the same in production database with one entry for each application server.

After making the entry  reload the server configuration files using “pg_ctl reload” or restart the postgres database.

[postgres@node1 data]$ pg_ctl reload
server signaled

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 )

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