Unable to start Spring Boot + PostgreSQL App, Getting org.postgresql.util.PSQLException: FATAL: password authentication failed for user


+ 1

I am using the correct username & password combination for my Spring Boot + PostgreSQL App, but I am getting the following exception on App startup

1 Answer

7 years ago by

+ 2

Look at your pg_hba.conf file which will be in the following location


And crosscheck the authentication mechanism, If it's not md5 then you cannot authenticate by using a password. So change the default peer to md5

Default config section


Change this to


Note: Make sure all of your users have passwords setup already
You can set the password by logging into psql console and by typing \password

Once you are done with all your changes your changes your pg_hba.conf file should look like the following

7 years ago by Karthik Divi



Your Answer