当前位置:网站首页>MySQL故障案例 | mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME

MySQL故障案例 | mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME

2022-06-23 08:43:00 凡人学运维

mysqldump 导数据出现如下错误

mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, ‘$.“number-of-buckets-specified”’) FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = ‘wx_service’ AND TABLE_NAME = ‘add_user’;’: Unknown table ‘column_statistics’ in information_schema (1109)

查看官网内容得知:

  • --column-statistics

Add ANALYZE TABLE statements to the output to generate histogram statistics for dumped tables when the dump file is reloaded. This option is disabled by default because histogram generation for large tables can take a long time.

https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_column-statistics

解决方法:

添加禁用参数:--column-statistics=0

mysqldump --column-statistics=0

END

原网站

版权声明
本文为[凡人学运维]所创,转载请带上原文链接,感谢
https://cloud.tencent.com/developer/article/2028271