Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

Here is the fix:


There is a file somewhere called pg_hba.conf

so I do this:


locate pg_hba.conf

vi /path/pg_hba.conf

add line at bottom

host    all         all           trust   (or whatever your IP is)



su - postgres

pg_ctl reload -D /var/lib/pgsql/data/

or if the data is located elewere do this

/usr/lib/postgresql/8.4/bin/pg_ctl -D 8.4/main/ reload

Posted in MySQL

Leave a Reply