.在安装MySQL 5.6.15时,安装完成后,后台日志报如下警告信息:InnoDB: Cannot open table
.在安装MySQL 5.6.15时,安装完成后,后台日志报如下警告信息:

2014-01-08 13:47:34 22946 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
问题产生原因:具体原因目前不详,网上查找到的资料:数据库打开这几张表的默认引擎为MyISAM,但是这几张表在建表时的引擎为INNODB
但是能确定的,这几张表确实是在mysql5.6中新入的
innodb_index_stats,
innodb_tables_stats,
slave_master_info,
slave_relay_log_info,
slave_worker_info
3.解决方法:
(1) 登录数据库,进入mysql库,执行如下SQL删除5张表
记住,一定要是drop table if exists
drop table if exists innodb_index_stats;
drop table if exists innodb_table_stats;
drop table if exists slave_master_info;
drop table if exists slave_relay_log_info;
drop table if exists slave_worker_info;
(2)这一部操作完成后,停止数据库,并进入到数据库数据文件所在目录,删除上面5个表所对应的idb文件,如下所示:
[mysql@test /data/mysqldata3/mydata/mysql]ls *.ibd
innodb_index_stats.ibd innodb_table_stats.ibd slave_master_info.ibd slave_relay_log_info.ibd slave_worker_info.ibd
[mysql@teset /data/mysqldata3/mydata/mysql]rm -f *.ibd
(3)重新启动数据库,进入到mysql库,重建上面被删除的表结构
source /usr/test/mysql/share/mysql_system_tables.sql
mysql_system_tables.sql位于安装目录的的share目录下
还有一种方法就是 用mysql_install_db --datadir ...--basedir=... 重新安装到一个目录下 记得不用指定defaultfiles 然后用这个目录下生成的新的系统库覆盖当前库
版权声明
本文仅代表作者观点,不代表Csuper立场。
本文系作者授权百度百家发表,未经许可,不得转载。