Thursday 20 November 2014

PostgreSQL user can not connect to server after changing password from PgAdmin

I changed postgres user password and after that I was stucked as I was not able to login, tried all the tricks by changing and re-setting password, but finally following solutions worked for me.


Error connecting to the server: FATAL:  password authentication failed for user " "
FATAL:  password authentication failed for user 

The expiry date was set wrong by default and that needs to be changed, 


  • You can check these expiry dates with:
    • SELECT usename,valuntil FROM pg_user;
and if they're wrong, reset them with:
    • ALTER USER username VALID UNTIL 'infinity';

Now you are done, restart pgAdmin again and start working with the particular user and password.