Anthony A

Posted on 20th May 2024|1094 views


Postgresql Password Authentication Failed For User

How to solve the password authentication failed for thge user in PostgreSQL?

Anusha V

Posted on 20th May 2024

  • Most of the cases when this kind of error occurs when you have entered the wrong password but anyway if this happens with right password according to you then you have the first to kill the tail watches first by disabling them.
  • In PostgreSQL DBMS, we have data in that  pg_hba.conf {/var/lib/pgsql/data/pg_hba.conf} you have to change the ‘md5’ to ‘trust’ and then you can log in without a password.
  • Now restart the PostgreSQL by using restartsrv_postgresql command.
  • After that, now you can change the password by using this command. 

ALTER USER postgres PASSWORD 'AddNewPassword'; 

  • Now again in the pgsql, we have data in that we have pg_hba.conf{/var/lib/pgsql/data/pg_hba.conf} where you have to change the entry from ‘trust’ to ‘md5’.
  • Now you remove the touch file of tailwatch, and you can restart the file and enter the new password which you changed, and this will open the file.

Write your answer


Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos