How to avoid mysqldump warning "Skipping the data of table mysql.event"
After a recent Debian upgrade on my LAMP webserver to Wheezy, mysqldump is throwing a warning:
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
Events seems to be something special. Man page for mysqldump:
* --events, -E
Include Event Scheduler events for the dumped databases in the output.
I have tried adding --skip-events
to tell mysqldump that this is explicitly the behaviour I wanted (although I don't know why...) but it still generates the warning.
How can I (a) stop it emitting this warning, or (b) otherwise include this awkward table, if its something I should be keeping.
This appears to be a feature for which there is a workaround
mysqldump -uroot -p --events --ignore-table=mysql.event mysql > /tmp/mysql.sql"
This says dump the event (--events) table and then ignore it.
For folks that are using automysqlbackup you will need to do the following:
-
Modify or Create your ~/.my.cnf and create a mysqldump section by adding the following
[mysqldump] events ignore-table = mysql.events
Using this solution guarantees that if you upgrade automysqlbackup that your changes won't be erased. Happy backing up!