How to stop automysqlbackup's cron.daily script -- as installed and configured from apt-get install automysqlbackup -- throwing the following error:
mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user
'debian-sys-maint'@'localhost' for table 'cond_instances' when using LOCK TABLES
This occurs after having upgraded to MySQL 5.5 as a side-effect of having upgraded to Ubuntu 12.04 LTS.
The correct solution (thanks @sr_ for pointer to the appropriate bug report) is to exclude the 'performance_schema' database from mysqldump.
So the question is: How to do this whilst respecting the Debian packages and configurations?
The problem occurs daily after having upgraded to MySQL 5.5.
Background: My aim is to stay with the Ubuntu Debian-installed packages and configurations in as standard a manner as possible. But actually, this is a bug with the way the packages are installed / upgraded, so it is necessary to update one of the supplied configuration files.
debian-sys-maint has fullest privileges anyway, so already has sufficient to lock each table before dumping it.
What's confusing is that /usr/share/doc/automysqlbackup/README.Debian says that
All parameters can be setup by editing the /etc/default/automysqlbackup file
/etc/default/automysqlbackup invokes mysqlbackup with settings in /etc/mysql/debian.cnf which says:
Automatically generated for Debian scripts. DO NOT TOUCH!.
