FATAL: no pg_hba.conf entry for host ::1
If you’re getting an error trying to connect to Postgres on localhost, the problem is probably that your system is configured for ipv6 but your Postgres isn’t. You can change this however.
First off, you need to find the pg_hba.conf file.
locate pg_hba.conf
Edit it and find the line which defines the localhost.
hosts all all md5
Below it, add the following line.
host all all ::1/128 trust
Finally, restart Postgres.
If you’re getting an error trying to connect to Postgres on localhost, the problem is probably that your system is configured for ipv6 but your Postgres isn’t. You can change this however.
First off, you need to find the pg_hba.conf file.
locate pg_hba.conf
Edit it and find the line which defines the localhost.
hosts all all md5
Below it, add the following line.
host all all ::1/128 trust
Finally, restart Postgres.