Notes

Fixing Mariadb --Column-Statistics Errors

June 5, 2023

Recent versions of mysqldump include a config to include a COLUMN_STATISTICS table. While StackExchange answers recommand passing a --column-statistics=0 flag to mysqldump, this isn’t always possible, e.g. when some code like Django is running mysqldump for you.

Instead of patching your mysqldump calls, if you recently upgraded from using mysql to mariadb, you should check if you’re still using the Oracle mysql version of mysqldump. Switching to the mariadb version of mysqldump may solve your problems. On ubuntu/debian, you can do so with

apt update
apt remove mysql-client
apt install mariadb-client