Dump All Databases in MySQL - Fails on mysql and performance_schema I have had two attempts at dumping all databases but both have failed, one with the mysql database and then with the performance_schema database. The precised errors are:-

11:01:01 Dumping mysql - mysqldump: Got error: 1556: You can't use locks with log tables. when doing LOCK TABLES
11:35:23 Dumping performance_schema () - mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES


Is there a way to overcome this? Basically I am trying to follw the procedure here:- https://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine/4056261#4056261

Many thanks...
Sounds like you are using an older version of the mysqldump client than the database you're taking the dump from.

Do a "which mysqldump", and see if it is in the same bin directory as your running mysqld. Up to date versions of mysqldump ignore performance_schema.