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:

updatedb

locate pg_hba.conf

vi /path/pg_hba.conf

add line at bottom

host    all         all         10.20.30.40           trust   (or whatever your IP is)

:wq

 

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