mysql5.6在导入时报innodb_table_stats不存在怎么办

这篇文章主要介绍mysql5.6在导入时报innodb_table_stats不存在怎么办,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

在处理问题时遇到这个报错
InnoDB: Error: Fetch of persistent statistics requested for table "mytest"."pomstd" but the required system tables MysqL.innodb_table_stats and MysqL.innodb_index_stats are not present or have unexpected structure. Using transient stats insttestd.
InnoDB: Error: Table "MysqL"."innodb_table_stats" not found.
InnoDB: Recalculation of persistent statistics requested for table "mytest"."pomstd" but the required persistent statistics storage is not present or is corrupted. Using transient stats insttestd.

检查目录,没有找到这个文件
这是MysqL5.6新增的性能分析文件,通常处理办法就是创建此文件
CREATE TABLE `innodb_table_stats` (
   `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
   `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
   `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `n_rows` bigint(20) unsigned NOT NULL,
   `clustered_index_size` bigint(20) unsigned NOT NULL,
   `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
   PRIMARY KEY (`database_name`,`table_name`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;

CREATE TABLE `innodb_index_stats` (
   `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
   `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
   `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
   `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
   `stat_value` bigint(20) unsigned NOT NULL,
   `sample_size` bigint(20) unsigned DEFAULT NULL,
   `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
   PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;

以上是“MysqL5.6在导入时报innodb_table_stats不存在怎么办”这篇文章的所有内容,感谢各位的阅读!希望分享内容对大家有帮助,更多相关知识,欢迎关注编程之家行业资讯频道!

相关文章

这篇文章主要介绍“hive和mysql的区别是什么”,在日常操作中...
这篇“MySQL数据库如何改名”文章的知识点大部分人都不太理解...
这篇文章主要介绍“mysql版本查询命令是什么”的相关知识,小...
本篇内容介绍了“mysql怎么修改字段的内容”的有关知识,在实...
这篇文章主要讲解了“mysql怎么删除unique约束”,文中的讲解...
今天小编给大家分享一下mysql怎么查询不为空的字段的相关知识...