How to Resolve Password Authentication Failed Errors in PostgreSQL®


If you try to access MySQL resources, your server will notify a Password authentication failed error for the attempt you tried. The prime offender is an invalid or missing PostgreSQL user password.


It’s necessary to monitor the /root/.pgpass password file to confirm the existing password in ::*:postgres:PASSWORD format.

If the password doesn’t match then you’ve to alter the var/lib/pgsql/data/pg_hba.conf file directly.

To do this:

  • To disable the Tailwatch. To perform the same, you’ve to run the following commands:


  • Alter the /var/lib/pgsql/data/pg_hba.conffile and make it md5 value to the trust value.
  •  Restart PostgreSQL. To do this, run

the /usr/local/cpanel/scripts/restartsrv_postgresql command.

  • Alter the PostgreSQL password. To perform this, run the following command, where new_pass represents the new password.


  •  Alter the /var/lib/pgsql/data/pg_hba.conf file and change the trust value to the md5 value.
  • Detach the Tailwatch touch file and restart the service. To get this done follow these commands:


Before, password was stored in the /var/lib/pgsql/.pgpass file. If the /root/.pgpass file does not exist, the system copies the .pgpass file to the /root/.pgpass file.PostgreSQL

Related Post

Leave a Reply