Unable to start MySQL: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Created:

2016-11-16 12:40:19 UTC

Modified:

2017-04-24 12:15:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to start MySQL: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Unable to start MySQL service, the following error can be found in mysql error log:

Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed

Cause

MySQL upgrade was started and not completed successfully. Defined password in MySQL database is incorrect.

Resolution

  1. Find password for debian-sys-maint user in /etc/mysql/debian.cnf :

    # grep 'password' /etc/mysql/debian.cnf
    password = PASSWORD
    password = PASSWORD
  2. Stop MySQL:

    # service mysql stop
  3. Add skip-grant-tables option into /etc/mysql/my.cnf in [mysqld] section.

  4. Start MySQL:

    # service mysql start
  5. Login in MySQL:

    # mysql
    # use mysql
  6. Update password with defined in /etc/mysql/debian.cnf :

    # UPDATE mysql.user SET Password = password('PASSWORD') WHERE User = 'debian-sys-maint';
  7. Remove skip-grant-tables option in /etc/mysql/my.cnf :

  8. Start mysql

    # service mysql start
Have more questions? Submit a request
Please sign in to leave a comment.