Database, MySQL

mysqldump – Unknown table COLUMN_STATISTICS

mysqldump – Unknown table COLUMN_STATISTICS

As I reviewed my MySQL backups, I noticed that the data is too small and as I review the logs, I get these error: Unknown table ‘COLUMN_STATISTICS’ in information_schema (1109). Turns out my backup has not been running properly and I have no idea about it.

This is probably related to some mysql package updates and the fix is simple as pointed out in this serverfault post. tldr; just add the following to the mysqldump command:

--column-statistics=0

I also updated my backup script which I have been using for a very long time.

https://github.com/lysender/dbautobackup

Its a very old PHP script I wrote several years ago.

Featured image by panumas nikhomkhai.

Leave a reply

Your email address will not be published. Required fields are marked *