PostgreSQL Error: FATAL: no pg_hba.conf entry for host
FATAL: no pg_hba.conf entry for host
You might get this error on connecting to PostgreSQL server using psql utility.
We can resolve this problem by following the below steps.
Step1: Login to the PostgreSQL server via SSH as root
Step2: Open the PostgreSQL configuration file and add or update following line.
listen_addresses = '*'
This will allow PostgreSQL instance to accept connections through any ipaddress in server.
Step3: Add or modify the following lines in pg_hba.conf.
host all all 0.0.0.0/0 md5
This will allow the users to login with an encrypted password.
Step4: Restart the PostgreSQL service.
That's all…