Unable to access Plesk: Access denied for user 'admin'@'localhost' (using password: YES)

Created:

2016-11-16 12:42:31 UTC

Modified:

2017-04-24 14:48:20 UTC

6

Was this article helpful?


Have more questions?

Submit a request

Unable to access Plesk: Access denied for user 'admin'@'localhost' (using password: YES)

Applicable to:

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

Symptoms

Unable to log in to Plesk. The following error is displayed instead of the login screen:

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

OR

Access denied for user 'admin'@'localhost' (using password: YES)

Cause

  • The password in /etc/psa/.psa.shadow file (which is used to access Plesk database), does not match the admin password in MySQL database.

Or:

  • old-passwords=1 option is enabled in /etc/my.cnf (on Debian based distributions the path is /etc/mysql/my.cnf ).

Resolution

  1. Make sure that option old-passwords = 1 is disabled in /etc/my.cnf file (on Debian based distributions the path is /etc/mysql/my.cnf ).

  2. Obtain the correct Plesk password:

    # cat /etc/psa/.psa.shadow
    $AES-128-*****************************************************
  3. Try connecting to the MySQL database and update admin password:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql
    mysql> UPDATE mysql.user SET Password=PASSWORD('$AES-128-***') WHERE User='admin';

    Note: If you are unable to connect, enable skip-grant-tables option in the /etc/my.cnf file (on Debian based distributions the path is /etc/mysql/my.cnf ), restart MySQL server and update the admin password:

    # cat /etc/my.cnf
    ...
    [mysqld]
    skip-grant-tables
    ...
    # /etc/init.d/mysqld restart
    # mysql -uadmin mysql
    # mysql> UPDATE mysql.user SET Password=PASSWORD('$AES-128-***') WHERE User='admin';

    After that, do not forget to remove skip-grant-tables and restart MySQL service.

  4. Update the password for Plesk using the ch_admin_passwd utility:

    # /usr/local/psa/bin/admin --show-password
    password
    # export PSA_PASSWORD=password
    # /usr/local/psa/admin/bin/ch_admin_passwd
Have more questions? Submit a request
Please sign in to leave a comment.