Plesk is accessible but error sometimes is shown: Access denied for user 'admin'@'localhost' (using password: YES)

Created:

2016-11-16 12:52:25 UTC

Modified:

2017-05-21 08:13:20 UTC

10

Was this article helpful?


Have more questions?

Submit a request

Plesk is accessible but error sometimes is shown: Access denied for user 'admin'@'localhost' (using password: YES)

Applicable to:

  • Plesk for Linux

Symptoms

Access to Plesk and database is possible, but the following errors occur:

  1. When performing any changes in Plesk or the Plesk database:

    ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
  2. When performing a Plesk upgrade:

    MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.9.5.4-11.0.9.20130807.dump.gz. ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)

Note: If Plesk is not accessible with this error, visit article #213364309

Cause

A reinstalled or broken MySQL server.

Resolution

For Windows see article 213388329 "ERROR PleskMainDBException Access denied for user 'admin'@'localhost' (using password: YES)"

  1. Make sure that the password for the admin user is set correctly using the following article for Linux: 213927525 "How to retrieve Plesk admin password on Linux"
  2. Make sure that the admin user has all privileges:

  3. Log into MySQL server under 'root':

         # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql
  4. Check admin privileges:

        mysql> SHOW GRANTS FOR 'admin'@'localhost'\G
  5. Grant all privileges to admin if required:

        GRANT ALL ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
  6. If the steps above will not help, or the previous command fails with an error, check /var/log/mysqld.log

If you see a message such as:

[ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it

this probably means that MySQL was reinstalled or was not upgraded completely. Run the following command to update MySQL:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
Have more questions? Submit a request
Please sign in to leave a comment.