mysqldump 导出提示Couldn't execute SELECT COLUMN_NAME...


mysqldump 导出提示Couldn't execute SELECT COLUMN_NAME...

mysqldump命令:

  导出数据库:mysqldump -h ip -u root -p dbname > db.sql;

  导出数据库中的某个表:mysqldump -h ip -u root -p dbname tablename > tablename.sql;

错误提示:

  mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS

原因:

  因为新版的mysqldump默认启用了一个新标志,通过--column-statistics=0来禁用他

解决方法:

  mysqldump --column-statistics=0 -h ip -u root -p dbname > db.sql;

声明:初心|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - mysqldump 导出提示Couldn't execute SELECT COLUMN_NAME...


愿你勿忘初心,并从一而终