Postgres password authentication error
I tried to access postgresql-server remotely via pgAdmin on Windows through Putty-Tunnel as explained here:
However, each time I try to connect with pgAdmin, I get the following error message:
Unable to connect to server:
FATAL: password authentication failed for user "postgres"
Putty-Tunnel:
Source port: 5433
Destination: 127.0.0.1:5432
pgAdmin:
Host name/address: 127.0.0.1
Port: 5432
Maintenance database: postgres
Username: postgres
Password: **** (password for postgres-db-user, and not linux-user)
Why can I not connect, and receive the Password error messages?
2 Replies
From everything I'm seeing in other forums about this, the common problem tends to be a confusion between the "postgres" user password versus the "postgres" database password. That said, it looks like you may be aware of the difference based on the note in your pgAdmin configuration - have you tried resetting the user password and trying again?
If you're not sure how, here's a great post that walks you through resetting the postgres
user password:
How to reset your forgotten password in PostgreSQL
This Stack Exchange post has a good explanation of how this could happen:
Postgres password authentication fails
And just in case, here's a link to our guide on configuring PostgreSQL:
Hope these help!
The problem was not the password, but the source port set in PuTTY ("5433"). First of all in the example provided the port in pgAdmin should have been set to "5433" as well.
But even then, I was not able to connect to the database. Once I changed it to another arbitrary port (in this case "9090"), I was able to connect to the database. I assume the port "5433" is already used for something on the client machine.