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"
Source port: 5433
Host name/address: 127.0.0.1
Maintenance database: postgres
Password: **** (password for postgres-db-user, and not linux-user)
Why can I not connect, and receive the Password error messages?
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.