Not able to login to Plesk: "saved admin password is incorrect"

Refers to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 13:17:44 UTC

Modified:

2017-01-27 19:03:24 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Not able to login to Plesk: "saved admin password is incorrect"

Symptoms

  1. An attempt to login to Plesk fails with the following error:

    saved admin password is incorrect

    The solution from the # 112492 article did not help.

  2. An attempt to create a database backup fails with the following error:

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` 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
  3. Plesk is not accessible after restoring of mysql database from backup:

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

Cause

The admin user is missing in mysql database.

Resolution

  1. Obtain Plesk password:

    # cat /etc/psa/.psa.shadow
    $AES-128-CBC$Jyz<...>xQOrRCig==
  2. Enable skip-grant-tables in the /etc/my.cnf file under the [mysqld] and restart MySQL service.

    # vim /etc/my.cnf
    [mysqld]
    ...
    skip-grant-tables
    ...
    # service mysqld restart
  3. Login to MySQL, switch to mysql database and verify that 'admin' user does not exist:

    # mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"select * from user where User='admin';" 
    Empty set (0.00 sec)
  4. Insert corresponding recored for admin in the mysql.users table:

    mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"INSERT INTO user VALUES ('localhost','admin','*747B6D2A95E7518F5C5A25A3A397E758E4E94E29','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',NULL);"
  5. Update admin user, set the correct password - the one that was obtain on the first step

    mysql> UPDATE mysql.user SET Password=PASSWORD('$AES-128-CBC$Jyz<...>xQOrRCig==') WHERE User='admin';
  6. If plugin and authentication_string fields exists in mysql.user table, then make sure that they are empty.

    mysql> update mysql.user set authentication_string='', plugin='' where User='admin';
    
  7. Remove the skip-grant-tables line in /etc/my.cnf

  8. Restart MySQL:

    # /etc/init.d/mysqld restart
Have more questions? Submit a request
Please sign in to leave a comment.