mysqldump: Got error: 1142: "SELECT, LOCK TABLES

Started by belrpr, July 07, 2018, 10:33:14 AM

Previous topic - Next topic

belrpr

Got an error in my daily MySQL backup:
Skipping database: information_schema.
Database Backup: mysql --> /backup/mysql/daily//mysql.sql
Database Backup: oauthv2 --> /backup/mysql/daily//oauthv2.sql
mysqldump: Got error: 1142: "SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'" when using LOCK TABLES
Database Backup: performance_schema --> /backup/mysql/daily//performance_schema.sql
Database Backup: postfix --> /backup/mysql/daily//postfix.sql
Database Backup: root_cwp --> /backup/mysql/daily//root_cwp.sql
Database Backup: roundcube --> /backup/mysql/daily//roundcube.sql


Anyway to solve this?

vidda

Same here...

After seeing many people getting this error, but not any one giving a clue or answer, I'm wondering if I'm the only one that can't solve this...           :-\

bullten

Well the error can be replicated when you are trying to dump performance_schema

mysqldump performance_schema > /home/performance_schema.sql

Output

Quotemysqldump: Got error: 1142: "SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'" when using LOCK TABLES

If you want to dump it you can skip table locks

mysqldump performance_schema --skip-lock-tables > /home/performance_schema.sql

Its definitely Centos Web Panel bug and they need to fix it. But what is the reason for dumping performance_schema?

ring_c

I'm getting the same error. It's in the email I'm getting daily for the daily backups.