找回“消失”的InnoDB引擎
夜里重做主从复制,顺便调整了下从库的my.cnf。早上想起从库忘了重启,打完命令接着开启slave,居然报错Last_SQL_Errno:1286Last_SQL_Error:Errorexecutingrowev
夜里重做主从复制,顺便调整了下从库的my.cnf。早上想起从库忘了重启,打完命令接着开启slave,居然报错
Last_SQL_Errno: 1286
Last_SQL_Error: Error executing row event: 'Unknown storage engine 'InnoDB''
奇怪,怎么会报错不知道存储引擎InnoDB。查看下引擎:
mysql> show engines; +--------------------+---------+-----------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+-----------------------------------------------------------+--------------+------+------------+ | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | | MyISAM | DEFAULT | MyISAM storage engine | NO | NO | NO | | CSV | YES | CSV storage engine | NO | NO | NO | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | +--------------------+---------+-----------------------------------------------------------+--------------+------+------------+ 5 rows in set (0.01 sec)没了,香港虚拟主机,InnoDB真的没了。我的心一下慌了,从来没听说过过引擎会自己消失的啊!再看看错误日志怎么说
130829 8:42:30 [Note] Slave I/O thread: connected to master 'slave@192.168.0.153:3306',replication started in log 'mysql-bin.000023' at position 232546566 130829 8:42:30 [ERROR] Slave SQL: Error executing row event: 'Unknown storage engine 'InnoDB'', Error_code: 1286 130829 8:42:30 [Warning] Slave: Unknown storage engine 'InnoDB' Error_code: 1286 130829 8:42:30 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000023' position 225856952看来InnoDB确实消失了。
遇到问题要先靠自己,这样才会提高自己。想想事件的过程:InnoDB消失了。为什么会消失?为什么是今天消失?我都有做过什么?好好想想。。。。
配置文件,香港服务器租用,没错,我夜里调整了my.cnf,然后早上重启mysql,然后InnoDB不见了。OK,原因找到了。赶紧将调整前后的配置文件对比,看看咱都改了哪些啊,虚拟主机,发现了最可疑的一个配置项:
innodb_log_files_in_group = 3
改回调整前的值2,重启mysql,开启slave,复制正常了,查看引擎,InnoDB也回来了!万幸啊。InnoDB的消失其实是因为修改配置导致mysql生成新的ib_logfile日志与旧的ib_logfile日志混乱引起的。整理下修改此配置项的操作步骤
service mysqld stop cd到数据目录下 mv ib_logfile* 到其他目录下 修改innodb_log_files_in_group service mysqld start本文出自 “拥抱开源世界分享开源技术” 博客,请务必保留此出处

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

PHP Fatal error: Call to undefined method PDO::prepare() in的解決方法

解決C++程式碼中出現的「error: incomplete type is not allowed」問題

在Vue應用程式中使用axios時出現「Uncaught (in promise) Error: Request failed with status code 500」怎麼辦?

解決C++程式碼中出現的「error: expected initializer before 'datatype'」問題

如何解決PHP Warning: fopen(): failed to open stream: No such file or directory

PHP Fatal error: Call to undefined function mysqli_connect()的解決方法

PHP Fatal error: Call to a member function fetch()的解決方法
