- Plesk Onyx for Linux
- Plesk for Linux
Plesk interface is inaccessible. One of the following error messages is shown in a web-browser:
PLESK_INFO: ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000]  Access denied for user 'admin'@'localhost' (using password: YES)
PLESK_INFO: PleskDBException: Unable to connect to database: mysql_connect(): Access denied for user 'admin'@'localhost' (using password: YES) (Error code: 1045) (Abstract.php:69)
PLESK_INFO: ERROR: PleskFatalException
Unable to connect to database: saved admin password is incorrect.
psaerror(string 'Unable to connect to database: saved admin password is incorrect.')
Additionally, an exception has occurred while trying to report this error: Zend_Exception
No entry is registered for key &;translate&; (Abstract.php:144)
When creating a manual database backup, the process fails with the following error message:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa > /tmp/psa.`date +%F_%H.%M`.sql
mysqldump: Got error: 1045: Access denied for user 'admin'@'localhost' (using password: YES) when trying to connect
plesk dbcommand returns the following error message:
CONFIG_TEXT: ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
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.
Note: This solution is not valid for Plesk Obsidian. Proceed to the manual solution if Plesk Obsidian is used.
Connect to the Plesk server via SSH.
Download the script for automated MySQL admin restoration:
# curl -LO https://plesk.zendesk.com/hc/article_attachments/360042955514/213364309-restore-admin-user.php.tar.gz
# tar xf 213364309-restore-admin-user.php.tar.gz
Run the script:
# plesk php 213364309-restore-admin-user.php
Try to access Plesk again. If the automated solution did not help, apply the manual solution.