这里是普通文章模块栏目内容页
Mysqldump 时出现错误及解决方案:mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME

Mysqldump 时出现错误及解决方案:mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME

mysqldump 导数据出现如下错误


 Couldn't execute 'SELECT COLUMN_NAME,                       JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME = 'mydatabase2' AND TABLE_NAME = 'my_auto';': Unknown table 'column_statistics' in information_schema (1109)

查看官网内容得知:

–column-statistics

连接:https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_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.

解决方法:

由于我本地使用了8.0mysqlclinet 所以才会报这个错误

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


mysqldump --column-statistics=0


栏目索引
相关内容