[转载] 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)重新启动数据库
注:这一步是必须的,否则无法正常配置双主架构。
- 工作总结 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 ...
- eclipse删除svn下载的文件后如何恢复
Team右键-->与资源库同步-->覆盖/更新
- eclipse中关闭java文件后再打开,找不到如何切换可视化编辑器
http://www.iteye.com/problems/64806 两种方式: 第一种正如楼上的老兄说的.在该java类中,鼠标右击,移动到openWith上 找到jigloo,找不到就在ot ...
- 生成CSV文件后再将CSV文件导入到mysql
1.生成CSV jar包:http://pan.baidu.com/s/1xIL26 String csvFilePath = "d:\\test.csv"; CsvWriter ...
- Mybase解决保存文件后再打开不能修改编辑
1.问题复现 2.解决方式 3.可以修改编辑
- ibdata1文件--缩小mysql数据库的ibdata1文件
摘要 在MySQL数据库中,如果不指定innodb_file_per_table参数,单独存在每个表的数据,MySQL的数据都会存放在ibdata1文件. mysql ibdata1存放数据,索引等, ...
- linux删除文件后,空间未释放的一种情况,使用lsof查看
linux某个目录空间快满了,删除了若干的文件后,使用df -h显示还是快满的,但是df -h *显示的总的文件大小又没那么大. 某个进程正在使用删除的文件,导致删除后,空间仍然不能释放. 查看rm掉 ...
- [转]MySql ibdata1文件太大如何缩小
From : http://blog.chinaunix.net/uid-24373487-id-4223322.html 原文地址:MySql ibdata1文件太大如何缩小 作者:emailwht ...
- 表单多文件上传样式美化 && 支持选中文件后删除相关项
开发中会经常涉及到文件上传的需求,根据业务不同的需求,有不同的文件上传情况. 有简单的单文件上传,有多文件上传,因浏览器原生的文件上传样式及功能的支持度不算太高,很多时候我们会对样式进行美化,对功能进 ...
随机推荐
- 【译】使用 Python 编写虚拟机解释器
[译]如何使用 Python 创建一个虚拟机解释器? 原文地址:Making a simple VM interpreter in Python 更新:根据大家的评论我对代码做了轻微的改动.感谢 ro ...
- laravel where中多条件查询
1. http://www.mobanstore.com/doc/bianchengkaifa/119.html //初学laravel 发现他的查询构造器很好用 //如下 $user = DB::t ...
- Delphi的时间处理
这几天因为自己要学习编写一个小程序中要用到一些时间处理.就在网上搜集一些教材学习到一般的应用,做个笔记,加深印象. 用上Delphi中相应的函数,Delphi的时间处理起来还是很容易的. Delphi ...
- 全国DNS汇总
全国DNS汇总 来路不明的DNS服务器可能导致你的帐号密码轻易被盗,请谨慎使用!在中国大陆,最科学的方法是将首选DNS服务器设置为114.114.114.114,备用DNS服务器设置为当地电信运营商的 ...
- ExtJs之Ext.util.MixedCollection
<!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta http-equiv ...
- linux下修改history命令保存条数
在linux系统下.history命令会保存多少条命令呢?曾在一本书上说,如果注销系统,那么会将所有的历史命令都定入到~/.bash_history, 但只保留1000条命令(这个是由默认的shell ...
- 【hdu3579-Hello Kiki】拓展欧几里得-同余方程组
http://acm.hdu.edu.cn/showproblem.php?pid=3579 题解:同余方程组的裸题.注意输出是最小的正整数,不包括0. #include<cstdio> ...
- Spring笔记——Spring框架简介和初次框架配置
Spring简介 Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson 在其著作Expert One-On-One J2EE Deve ...
- HTML5的fieldset标签
定义和用法 fieldset 元素可将表单内的相关元素分组,绘制一个带标题的框,有如winform开发中的panel. <fieldset> 标签将表单内容的一部分打包,生成一组相关表单的 ...
- Linux命令-dd
dd命令用于指定大小的拷贝的文件或指定转换文件. 以下命令作用:将光驱设备拷贝成镜像文件 参数 if 输入的文件名称 参数 of 输出的文件名称 [root@localhost testA]# dd ...