<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[[Warning] InnoDB: Cannot open table mysql/slave_master_info]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[数据库类]]></category>
<pubDate>Wed, 27 Jul 2016 06:09:48 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	一、今天编译安装了MySQL5.6.31，安装启动之后错误日志报以下Warning信息：<br/>160727 12:52:32 mysqld_safe Starting mysqld daemon with databases from /home/mysql/3307/data<br/>2016-07-27 12:52:33 0 [Note] /usr/local/webserver/mysql56/bin/mysqld (mysqld 5.6.31-log) starting as process 26248 ...<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Using atomics to ref count buffer pool pages<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: The InnoDB memory heap is disabled<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Memory barrier is not used<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Compressed tables use zlib 1.2.3<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Using CPU crc32 instructions<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Initializing buffer pool, size = 512.0M<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Completed initialization of buffer pool<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Highest supported file format is Barracuda.<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: 128 rollback segment(s) are active.<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: Waiting for purge to start<br/>2016-07-27 12:52:33 26248 [Note] InnoDB: 5.6.31 started; log sequence number 1601096<br/>2016-07-27 12:52:33 26248 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3307<br/>2016-07-27 12:52:33 26248 [Note]&nbsp;&nbsp; - '0.0.0.0' resolves to '0.0.0.0';<br/>2016-07-27 12:52:33 26248 [Note] Server socket created on IP: '0.0.0.0'.<br/>2016-07-27 12:52:33 26248 [Warning] 'user' entry 'root@localhost.localdomain' ignored in --skip-name-resolve mode.<br/>2016-07-27 12:52:33 26248 [Warning] 'user' entry '@localhost.localdomain' ignored in --skip-name-resolve mode.<br/>2016-07-27 12:52:33 26248 [Warning] 'proxies_priv' entry '@ root@localhost.localdomain' ignored in --skip-name-resolve mode.<br/>2016-07-27 12:52:33 26248 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for th<br/>e table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.<br/>2016-07-27 12:52:33 26248 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.<br/>2016-07-27 12:52:33 26248 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for th<br/>e table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.<br/>2016-07-27 12:52:33 26248 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for<br/> the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.<br/>2016-07-27 12:52:33 26248 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.<br/>2016-07-27 12:52:33 26248 [Note] Event Scheduler: Loaded 0 events<br/>2016-07-27 12:52:33 26248 [Note] /usr/local/webserver/mysql56/bin/mysqld: ready for connections.<br/><br/><br/>BUG产生具体原因不详，官方bugs.mysql.com上有提供修复这5张表的SQL文件，下载链接：http://bugs.mysql.com/file.php?id=19725<br/><br/>下面我们就按照文件的说明操作<br/>&nbsp;&nbsp;1. drop these tables from mysql:<br/>&nbsp;&nbsp;&nbsp;&nbsp; innodb_index_stats<br/>&nbsp;&nbsp;&nbsp;&nbsp; innodb_table_stats<br/>&nbsp;&nbsp;&nbsp;&nbsp; slave_master_info<br/>&nbsp;&nbsp;&nbsp;&nbsp; slave_relay_log_info<br/>&nbsp;&nbsp;&nbsp;&nbsp; slave_worker_info<br/>&nbsp;&nbsp; <br/>&nbsp;&nbsp;2. delete all .frm & .ibd of the tables above.<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;3. run this file to recreate the tables above (source five-tables.sql).<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;4. restart mysqld.<br/><br/>二、具体操作步骤<br/>2.1、删除这5张表<br/>drop table if exists innodb_index_stats;<br/>drop table if exists innodb_table_stats;<br/>drop table if exists slave_master_info;<br/>drop table if exists slave_relay_log_info;<br/>drop table if exists slave_worker_info;<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=215" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=215" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>2.2、删除这5张表对应的.frm和.ibd文件<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=216" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=216" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>rm -f /home/mysql/3307/data/mysql/*.ibd<br/><br/>2.3、导入下载的five-tables.sql文件<br/>source /home/sql/five-tables.sql<br/><br/>2.4、导入完成之后，重新启动MYSQL服务<br/><br/>三、检验结果：<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=217" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=217" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>已经没有报错信息了。<br/>Tags - <a href="http://www.zhanghaijun.com/tags/mysql5.6/" rel="tag">mysql5.6</a> , <a href="http://www.zhanghaijun.com/tags/mysql/" rel="tag">mysql</a> , <a href="http://www.zhanghaijun.com/tags/innodb/" rel="tag">innodb</a> , <a href="http://www.zhanghaijun.com/tags/slave_master_info/" rel="tag">slave master info</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] [Warning] InnoDB: Cannot open table mysql/slave_master_info]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>