Author Topic: mysqldump: Got error: 1142: "SELECT, LOCK TABLES  (Read 425 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
mysqldump: Got error: 1142: "SELECT, LOCK TABLES
« on: July 07, 2018, 10:33:14 AM »
Got an error in my daily MySQL backup:
Code: [Select]
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?

Offline
*
Re: mysqldump: Got error: 1142: "SELECT, LOCK TABLES
« Reply #1 on: September 03, 2018, 09:15:31 PM »
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...           :-\

Offline
****
Re: mysqldump: Got error: 1142: "SELECT, LOCK TABLES
« Reply #2 on: September 03, 2018, 09:38:34 PM »
Well the error can be replicated when you are trying to dump performance_schema

Code: [Select]
mysqldump performance_schema > /home/performance_schema.sql
Output

Quote
mysqldump: 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

Code: [Select]
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?

Offline
**
Re: mysqldump: Got error: 1142: "SELECT, LOCK TABLES
« Reply #3 on: September 04, 2018, 05:22:34 AM »
I'm getting the same error. It's in the email I'm getting daily for the daily backups.