FATAL: no pg_hba.conf entry for host 

Joined:
04/07/2009
Posts:
163

July 01, 2010 18:54:08    Last update: August 31, 2010 22:40:41
Problem: cannot connect to PostgreSQL server because of above error.

Solution: add the host entries to the /usr/local/pgsql/data/pg_hba.conf file:
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               trust

# IPv4 remote connections:
host    all         all         105.52.84.130/32      trust
host    all         all         105.52.84.50/32       trust
host    all         all         105.52.83.82/32       trust


Reference for CIDR address: http://oav.net/mirrors/cidr.html
Share |
| Comment  | Tags