Centos – pg_hba.conf entry for host

centosdedicated-serverpostgresqlvps

Im getting this error with postgre in my centos vps

Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry
for host "::1", user "xxx", database "xxx_xxx", SSL off in

Here is my pg_hba.conf

local all all md5 
host all all 127.0.0.1/32 md5

Everything seems right, but always get this error, no matter what user i create and set.

Best Answer

Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "::1", user "xxx", database "xxx_xxx", SSL off in

"::1" means that you're connecting via IPv6.

Either specify -h 127.0.0.1 or add/uncomment an entry to/in pg_hba.conf:

host all all ::1/128 md5