Articles in this section

Unable to restore the databases from backups: ERROR 1045 (28000): Access denied for user 'backup_KVYH7GC'@'localhost' (using password: YES)

kb: technical

Symptoms

  • The Backup restoration task fails with the error:

    PLESK_ERROR: Errors occurred during deployment of database content. Not all content may be restored. Resolve the errors if required or try to restore the content manually from the archive: databases/d4lec4n3lAp_ce2wz_1[sqldump]: backup_sqldump_2401070012_2401280013.tzst
    Warning:
    Execution of /usr/bin/mysql --defaults-file=/etc/mysql/my.cnf -u backup_KVYH7GC -h localhost -P 3306 --default-character-set utf8 --abort-source-on-error d4lec4n3lAp_ce2wz failed with return code 1.
    Stdin is
    source /tmp/pmm-ru-udb-dump-oVpxkB/backup_sqldump_2401070012_2401280013;
    exit
    Stderr is
    ERROR 1045 (28000): Access denied for user 'backup_KVYH7GC'@'localhost' (using password: YES)
    Last error is
    Resource temporarily unavailable

Cause

The user table of the mysql database contains records with an empty username:

MYSQL_LIN: MariaDB [mysql]> SELECT User, Host FROM mysql.user where user='';
+------+--------------------+
| User | Host |
+------+--------------------+
| | admin.hostname |
| | localhost |
+------+--------------------+
2 rows in set (0.001 sec)

Resolution

In order to resolve the issue, remove the incorrect users from the mysql database via the following steps:

1. Conneсt to the server via SSH

2. Connect to the MySQL service:

# plesk db

3. Remove the records with the empty username value:

# delete from mysql.user where user = "";

4. Start the restoration process once again

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.