Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
A backup task finishes with the following warning message in Plesk:
PLESK_ERROR: Warning: mysql "db_name"
Not all the data was backed up into /var/lib/psa/dumps/domains/example.com/databases/db_name successfully. Total space: 18.00 GB; Available space: 11.00 GB; Mounted on: /. mysqldump: Got error: 1449: "The user specified as a definer ('db_user'@'%') does not exist" when using LOCK TABLES -
When exporting a MySQL / MariaDB database at Domains > example.com > Databases > db_name > Export Dump, the operation fails with:
PLESK_ERROR: Unable to export a dump of db_name:
mysqldump: Got error: 1045: "Access denied for user 'db_user'@'%' (using password: YES)" when using LOCK TABLES -
When opening views in phpMyAdmin, the page fails to load with:
CONFIG_TEXT: #1449 - The user specified as a definer ('db_user'@'localhost') does not exist
CONFIG_TEXT: #1045 - Access denied for user 'db_user'@'%' (using password: YES)
-
Migration of a subscription fails in Plesk Migrator with the following error message:
PLESK_ERROR: Failed to copy content of database 'dbname'
Migration tools tried to perform operation in 3 attempts: Command execution failed on the source server 'source' (203.0.113.2) with non-zero exit code.
...
exit code: 2
stdout:
stderr: mysqldump: Got error: 1449: The user specified as a definer ('old-dbuser'@'%') does not exist when using LOCK TABLES
Cause
The MySQL / MariaDB user set as a definer in the MySQL / MariaDB view is missing in the system or has different "Access control" setting.
Resolution
-
Check whether the MySQL user from the error message exists under subscription at Domains > example.com > Databases > User Management.
-
If the user exists - change its Access control setting:
-
-
-
- Go to Domains > example.com > Databases > User Management.
-
Click on the user mentioned in the error message
-
Change the access control setting to "Allow remote connections from any host".
-
Apply the changes.
-
If the user does not exist - create a new user:
-
Go to Domains > example.com > Databases > User Management > Add Database User.
-
Fill in the fields with the missing database user from the the error message, in our example: db_user > OK.
-
-
Comments
0 comments
Please sign in to leave a comment.