We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Page tree
Skip to end of metadata
Go to start of metadata

Overview

If your server returns a Password authentication failed for user error when you try to access MySQL® resources, the most likely culprit is an invalid or missing PostgreSQL® user password.

Solution


Check the /root/.pgpass password file to confirm that the password exists in ::*:postgres:PASSWORD format.

if the password does not exist, you must edit the /var/lib/pgsql/data/pg_hba.conf file directly with the following steps:

Stop Tailwatch

Run the following commands to disable and stop Tailwatch:

touch /etc/tailwatchddisable
killall tailwatchd

 

Change the encryption to md5

Edit the /var/lib/pgsql/data/pg_hba.conf file and change md5 to trust

 


 

Restart PostgreSQL

Run the /scripts/restartsrv_postgresql restart command to restart PostgreSQL.



Change the PostgreSQL password

Change the PostgreSQL password with the following command, where new_pass represents the new password:

postgres=# alter user postgres with encrypted password =new_pass postgres=# \q

Change the encryption back to md5

Edit the /var/lib/pgsql/data/pg_hba.conf file and change trust back to md5



Remove the Tailwatch touch file and restart it

Run the following commands to remove the Tailwatch touch file and restart the service:

rm /etc/tailwatchddisable
/scripts/restartsrv_tailwatchd

Previously, the system stored passwords 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.

Additional documentation

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels