cancel
Showing results for 
Search instead for 
Did you mean: 

Can't run psql app after fresh install, "psql: FATAL: password authentication failed..."

Level 3 Traveller

Can't run psql app after fresh install, "psql: FATAL: password authentication failed..."

Full error message is

 

psql: FATAL:  password authentication failed for user "postgres"

password retrieved from file "/Users/me/.pgpass"

 

There's no .pgpass file where it's looking, incidentally.

 

Help?

 

This is on Mac 10.14.4 using the postgresql-11.2-1-osx.dmg installer.

1 REPLY 1
Highlighted
EDB Team Member

Re: Can't run psql app after fresh install, "psql: FATAL: password authentication failed...&qu

Hi @arzachel,

 

There must .pgpass file under the home directory of the user, as postgres first tries to retrieve password from the .pgpass file, if that file is not present, it will prompt for the password.

 

Please check its existence with below commands:

 

ls -lrth /Users/<user_name>/.pgpass

ls -la /Users/<user_name>/.pgpass

 

If it is present update the file with the correct password, of you do not want to use .pgpass, just remove it.

 

If you want your psql client to connect without password, make the pg_hba.conf entry as trust instead of md5 and reload the database cluster.

 

Please get back to us in case of any issues/queries.

 

Regards,

Sudhir