All we need is an easy explanation of the problem, so here it is.
I have a computer I was just given that is hosting a PostgreSQL 14 database on it. On my local computer I have just freshly installed PgAdmin 4.
On PgAdmin, I made a new server group named after the customer I am doing work for and then am attempting to connect to this server. I am entering my credentials
But I keep getting the error as shown in the bottom of my second picture –
Unable to connect to server: connection to server at "192.168.57.60" port 5432 failed: FATAL: no pg_hba.conf entry for host "192.168.57.76", user "root", database "PostgreSQL 14", no encrpytion
I have found other stack overflows regarding a similar message saying no SSL, and requiring changes and I do already have
listen_addresses = '*' in my postgresql.conf
host all all ::1/128 scram-sha-256 host all postgres 127.0.0.1/32 scram-sha-256
I don’t know what else to change or to fix. What am I missing here to connect?
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
You need tu allow connections from the machine where pgAdmin runs. In
pg_hba.conf, add a line like
host all username 192.168.0.0/16 scram-sha-256
Then reload or restart PostgreSQL (the latter is necessary if you change
listen_addresses), and there should be an improvement.
Note that the database user is almost certainly not called
root, and the database almost certainly not
PostgreSQL 14. I don’t know what choices you made when you setup PostgreSQL, but try
postgres for both.
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂