Symptoms
Plesk interface is inaccessible. One of the following error messages is shown in a web-browser or when executing some Plesk utilities, like plesk db
or plesk login
:
ERROR: 500 PleskExceptionDatabase
Zend_Db_Adapter_Exception: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)
ERROR: PleskFatalException
Unable to connect to database: saved admin password is incorrect.
0: common_func.php3:93
psaerror(string 'Unable to connect to database: saved admin password is incorrect.')
1: auth.php3:127
Additionally, an exception has occurred while trying to report this error: Zend_Exception
No entry is registered for key &;translate&; (Abstract.php:144)
Cause
The hashed password in the file /etc/psa/.psa.shadow
, that is used to access Plesk database, does not match the admin password in the 'mysql' database.
Resolution
If the password for MySQL admin user is known
-
Make a backup of the file
/etc/psa/.psa.shadow
:# cp /etc/psa/.psa.shadow /etc/psa/.psa.shadow.bak
-
Insert the new password in
/etc/psa/.psa.shadow
in plain text:# echo 'new_password' > /etc/psa/.psa.shadow
Note: do not forget to replace the new password from the command by the proper password.
-
Set the same password using Plesk utility in order to store it encrypted in
/etc/psa/.psa.shadow
:# PSA_PASSWORD=new_password /usr/local/psa/admin/sbin/ch_admin_passwd
Note: if this command produces some output, apply the 2 method.
If the password for MySQL admin user is unknown
-
Connect to the Plesk server via SSH.
-
With the command below, check if the directive
old-passwords
exist in the MySQL configuration filemy.cnf
(no output means it does not exist):# grep -ir old-passwords /etc/my*
- If it exists, remove it using a text editor.
-
Get a hashed password…