[转载] mysql5.6 删除之前的ibdata1文件后再重新生成,遇到[Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.问题
转载:http://blog.csdn.net/wxc20062006/article/details/17999407

1.在安装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.

2014-01-08 13:47:34 22946 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
2014-01-08 13:47:34 22946 [Warning] InnoDB: Cannot open table mysql/slave_worker_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.
2014-01-08 13:47:34 22946 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_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.
2014-01-08 13:47:34 22946 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.
.......
2014-01-08 13:49:33 22946 [Warning] InnoDB: Cannot open table mysql/innodb_index_stats 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.
2014-01-08 13:49:49 7f3ae82a5700  InnoDB: Error: table `mysql`.`innodb_index_stats` does not exist in the InnoDB internal



2.问题产生原因:具体原因目前不详,网上查找到的资料:数据库打开这几张表的默认引擎为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;

如下是执行的结果,忽略你看到的Warning信息

admin@localhost : mysql 02:12:26> drop table if exists innodb_index_stats;

Query OK, 0 rows affected, 1 warning (0.00 sec)

Warning (Code 155): Table 'mysql.innodb_index_stats' doesn't exist
admin@localhost : mysql 02:12:26> drop table if exists innodb_table_stats;
Query OK, 0 rows affected, 1 warning (0.00 sec)

Warning (Code 155): Table 'mysql.innodb_table_stats' doesn't exist
admin@localhost : mysql 02:12:26> drop table if exists slave_master_info;
Query OK, 0 rows affected, 1 warning (0.00 sec)


Warning (Code 155): Table 'mysql.slave_master_info' doesn't exist
admin@localhost : mysql 02:12:27> drop table if exists slave_relay_log_info;
Query OK, 0 rows affected, 1 warning (0.00 sec)


Warning (Code 155): Table 'mysql.slave_relay_log_info' doesn't exist
admin@localhost : mysql 02:12:27> drop table if exists slave_worker_info;
Query OK, 0 rows affected, 1 warning (0.00 sec)
Warning (Code 155): Table 'mysql.slave_worker_info' doesn't exist

执行完后,可以用show tables查看一下,看表的数据是否已经比删除之前减少了,如果减少了,说明你成功了!

(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库,重建上面被删除的表结构:

数据库的建设表脚本在mysql软件的安装目录的share目录下,我的mysql软件的安装路径为/usr/test/mysql

admin@localhost : (none) 02:23:03> use mysql
Database changed

如下是执行建表脚本前表的数量:

admin@localhost : mysql 02:23:48> source /usr/test/mysql/share/mysql_system_tables.sql

admin@localhost : mysql 02:23:50> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
23 rows in set (0.00 sec)

如下为执行建表脚本后,表的数量

admin@localhost : mysql 02:23:46> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| innodb_index_stats        |
| innodb_table_stats        |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
28 rows in set (0.00 sec)

(4) 用show create table命令查看表时,也完正常,后台日志中也不再报与上面提到的5张表相关的错误,到此,问题全部解决!





后记:在后面的环境中,配置双主架构时,又遇到了如下问题:

error:
ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.
最后通过如下的操作解决的问题,具体原因还尚未清楚

(1)登录数据库后,删除5张表,并重新导入脚本
use mysql
drop table  slave_master_info;
drop table  slave_relay_log_info;
drop table  slave_worker_info;
drop table  innodb_index_stats;
drop table  innodb_table_stats;
source /usr/coolpad/mysql/share/mysql_system_tables.sql

(2)重新启动数据库

注:这一步是必须的,否则无法正常配置双主架构。

[转载] mysql5.6 删除之前的ibdata1文件后再重新生成,遇到[Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.问题的更多相关文章

  1. 工作总结 1 sql写法 insert into select from 2 vs中 obj文件和bin文件 3 npoi 模板copy CopySheet 最好先全部Copy完后 再根据生成sheet写数据 4 sheet.CopyRow(rowsindex, rowsindex + x); 5 npoi 复制模板如果出现单元格显示问题

    我们可以从一个表中复制所有的列插入到另一个已存在的表中: INSERT INTO table2SELECT * FROM table1; 或者我们可以只复制希望的列插入到另一个已存在的表中: INSE ...

  2. eclipse删除svn下载的文件后如何恢复

    Team右键-->与资源库同步-->覆盖/更新

  3. eclipse中关闭java文件后再打开,找不到如何切换可视化编辑器

    http://www.iteye.com/problems/64806 两种方式:   第一种正如楼上的老兄说的.在该java类中,鼠标右击,移动到openWith上 找到jigloo,找不到就在ot ...

  4. 生成CSV文件后再将CSV文件导入到mysql

    1.生成CSV jar包:http://pan.baidu.com/s/1xIL26 String csvFilePath = "d:\\test.csv"; CsvWriter ...

  5. Mybase解决保存文件后再打开不能修改编辑

    1.问题复现 2.解决方式 3.可以修改编辑

  6. ibdata1文件--缩小mysql数据库的ibdata1文件

    摘要 在MySQL数据库中,如果不指定innodb_file_per_table参数,单独存在每个表的数据,MySQL的数据都会存放在ibdata1文件. mysql ibdata1存放数据,索引等, ...

  7. linux删除文件后,空间未释放的一种情况,使用lsof查看

    linux某个目录空间快满了,删除了若干的文件后,使用df -h显示还是快满的,但是df -h *显示的总的文件大小又没那么大. 某个进程正在使用删除的文件,导致删除后,空间仍然不能释放. 查看rm掉 ...

  8. [转]MySql ibdata1文件太大如何缩小

    From : http://blog.chinaunix.net/uid-24373487-id-4223322.html 原文地址:MySql ibdata1文件太大如何缩小 作者:emailwht ...

  9. 表单多文件上传样式美化 && 支持选中文件后删除相关项

    开发中会经常涉及到文件上传的需求,根据业务不同的需求,有不同的文件上传情况. 有简单的单文件上传,有多文件上传,因浏览器原生的文件上传样式及功能的支持度不算太高,很多时候我们会对样式进行美化,对功能进 ...

随机推荐

  1. POJ 2135

    Farm Tour Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10840   Accepted: 4011 Descri ...

  2. awk处理之案例一:awk 处理百分比的问题

    编译环境 本系列文章所提供的算法均在以下环境下编译通过. [脚本编译环境]Federa 8,linux 2.6.35.6-45.fc14.i686 [处理器] Intel(R) Core(TM)2 Q ...

  3. hdu 4767 Bell

    思路:矩阵快速幂+中国剩余定理!! 查资料得到2个公式:             1) B[n+p] = B[n] + B[n+1] mod p ;             2) B[p^m+n] = ...

  4. Windbg 常用命令整理

    kd> !idt -a      查看idt kd> dt _ktrap_frame   异常帧 kd> ba e1 Address 下硬件执行断点kd> ba w4 Addr ...

  5. java volatile 和Transient 关键字

    java关键字volatile volatile修饰的成员变量在每次被线程访问时,都强迫从主内存中重读该成员变量的值.而且,当成员变量发生变化时,强迫线程将变化值回写到主内存.这样在任何时刻,两个不同 ...

  6. Shell练习 行列转换

    原题:https://leetcode.com/problems/transpose-file/Given a text file file.txt, transpose its content. Y ...

  7. Discuss!X3.2 绑定微信

    完整程序 http://pan.baidu.com/s/1jGL5veQ 密码kgga Discuz!X3.2 在继承和完善 Discuz!X3.1 的基础上,针对社区移动端进行了新的尝试.新版本主要 ...

  8. lua 的 WriteFile 和 ReadFile

    lua 的 ReadFile 和 WriteFile 注意: lua 代码中的 string 可以包含二进制数据 string.len(str) 不会被 '\0' 截断 从 lua 传入 c 时: 需 ...

  9. fastdfs-client-java工具类封装

    FastDFS是通过StorageClient来执行上传操作的 通过看源码我们知道,FastDFS有两个StorageClient工具类.

  10. Java:多线程

    创建线程的方式有两种: 第一种:使用线程类Thread或者继承它的子类创建线程对象 第二种:定义接口类实现接口Runnable创建线程对象 多线程的好处:可以整合资源,提高系统资源的利用率 多线程中提 ...