• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue mysqldump error when trying to export a DB dump in Plesk

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:
  • 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)
I can replicate it in cli running mysqldump, *BUT* if I use "--single-transaction" option the command completes successfully. As in:

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.
 
But it didn't make any difference, still getting the same error mentioning LOCK TABLES. How can I fix this?
Looks like you forgot to run

flush privileges;

after your SQL query. Also SQL query:

GRANT SELECT ON mysql.proc to 'db_user';

may be required.
 
Tks @IgorG , in fact I did run FLUSH PRIVILEGES several times. I've also run the "GRANT SELECT ON mysql.proc to 'db_user'" you suggested, no luck yet. I'm really at a loss...
Is there a way to configure the mysqldump options for the Plesk panel?
 
Back
Top