burnley
Regular Pleskian
CentOS Linux 7.8.2003 (Core) running Plesk Obsidian Version 18.0.29 Update #2
MariaDB 10.2.33
We have this database which can't be exported from Plesk because the configured db user doesn't (didn't?) have LOCK TABLES privileges. When I try to export it using the Export Dump link in the Databases page I get this error:
Unable to export a dump of db_name:
1. Failure:
# mysqldump -u db_user -p'password' -h localhost db_name >db_name.sql
mysqldump: Got error: 1045: "Access denied for user ''db_user@'localhost' (using password: YES)" when using LOCK TABLES
2. Success:
# mysqldump -u db_user -p'password' -h localhost --single-transaction db_name >db_name.sql
#
I then went into the mysql console running "plesk db" and executed:
MariaDB [psa]> GRANT SELECT, LOCK TABLES ON `db_name`.* TO 'db_user'@'localhost';
But it didn't make any difference, still getting the same error mentioning LOCK TABLES. How can I fix this?
And anther question: Is there any way to configure the mysqldump options list when it's executed from the Plesk panel? Thinking of using "--single-transaction", which is the recommended way to dump InnoDB tables in the recent MySQL / MariaDB version anyway.
MariaDB 10.2.33
We have this database which can't be exported from Plesk because the configured db user doesn't (didn't?) have LOCK TABLES privileges. When I try to export it using the Export Dump link in the Databases page I get this error:
Unable to export a dump of db_name:
- mysqldump: Got error: 1045: "Access denied for user 'db_user'@'localhost' (using password: YES)" when using LOCK TABLES
- ("program 'mysqldump' finished with non-zero exit code: %d", 2)
1. Failure:
# mysqldump -u db_user -p'password' -h localhost db_name >db_name.sql
mysqldump: Got error: 1045: "Access denied for user ''db_user@'localhost' (using password: YES)" when using LOCK TABLES
2. Success:
# mysqldump -u db_user -p'password' -h localhost --single-transaction db_name >db_name.sql
#
I then went into the mysql console running "plesk db" and executed:
MariaDB [psa]> GRANT SELECT, LOCK TABLES ON `db_name`.* TO 'db_user'@'localhost';
But it didn't make any difference, still getting the same error mentioning LOCK TABLES. How can I fix this?
And anther question: Is there any way to configure the mysqldump options list when it's executed from the Plesk panel? Thinking of using "--single-transaction", which is the recommended way to dump InnoDB tables in the recent MySQL / MariaDB version anyway.