Reset root password on plesk mysql

Errors in plesk:

# /usr/local/psa/bin/admin --show-password
SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)

Accessing the plesk panel:


ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES) (Abstract.php:144)

Reset the root password

UPDATE – See this for cool script to reset the password – https://support.plesk.com/hc/en-us/articles/213364309-Unable-to-access-Plesk-on-Linux-Access-denied-for-user-admin-localhost-using-password-YES-


# service mysqld stop

# mysqld_safe --skip-grant-tables
# service mysqld start

Login:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Or,


# mysql -u root

# mysql> use mysql;
# mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
# mysql> flush privileges;
# mysql> quit

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.