MySQL Plugin 'InnoDB' init function returned error一例
早上上班后,测试说演示环境挂了,维护上去看了下,启动报错了:
XXXXXX08:30:47 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
XXXXXX08:30:50 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
XXXXXX08:30:50 [Note] Plugin 'FEDERATED' is disabled.
XXXXXX08:30:51 InnoDB: The InnoDB memory heap is disabled
XXXXXX08:30:51 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
XXXXXX08:30:51 InnoDB: Compressed tables use zlib 1.2.3
XXXXXX08:30:51 InnoDB: Using Linux native AIO
XXXXXX08:30:51 InnoDB: Initializing buffer pool, size = 16.0M
XXXXXX08:30:51 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 104857600 bytes!
XXXXXX08:30:51 [ERROR] Plugin 'InnoDB' init function returned error.
XXXXXX08:30:51 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
XXXXXX08:30:51 [ERROR] Unknown/unsupported storage engine: InnoDB
XXXXXX08:30:51 [ERROR] Aborting
网上的说法是“没有正常关闭mysqld服务的情况下,对数据库参数进行改变导致的。因此重启后的服务器不支持InnoDB引擎。
解决方法是:删除MySQL目录下的ib_logfile0和ib_logfile1两个文件”。
其实这有个条件,就是block没有损坏,如果有block损坏了,这样还是无法启动的。
还有个帖子说的是删除mysql目录下的data中所有文件,这不等于完全初始化么?这要是DEMO库就算了,要是线上库、用了几个月的开发、测试库,那重新初始化的成本也太高昂了,况且老板也不允许这么个搞法。
没辙,只能先用innodb_force_recovery=1启动,把数据备份出来,再还原了。
启动后,mysqldump时发现一张表的PK有问题了,没发整个dump出来,是张归档表,直接drop了,其他到问题不大,都出来了。
最后删除所有mysql db数据,重新执行mysql_install_db初始化,最后source alldb.sql还原。
还是得规规矩矩启动和停止,kill db真心有风险。
发现大部分的公司存在的一种现象就是备份嫌烦、standby也嫌烦,然后就宕机了,block损坏了。一拨人干等着一个库。
早上shutdown不掉,kill了下mysqld,导致出现了下僵尸defunct进程,幸亏Kill ps -ef | grep defunct_process_pid父进程成功杀掉了。
MySQL Plugin 'InnoDB' init function returned error一例的更多相关文章
- MySQL Plugin 'InnoDB' init function returned error
. . 在MySQL的配置文件中,设定default-table-type=InnoDB,发现MySQL无法正常的启动,错误日志中给出了如下的信息: 150210 18:11:19 mysqld_sa ...
- mysql Plugin ‘InnoDB’ init function returned error
问题描述: 非正常关闭mysql,同时更改了my.cnf 导致启动时不支持innodb,出现如下错误: [ERROR] Plugin ‘InnoDB’ init function returned ...
- MySQL 从 5.5 升级到 5.6,启动时报错 [ERROR] Plugin 'InnoDB' init function returned error
MySQL 从 5.5 升级到 5.6,启动时报错: [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'Inn ...
- [ERROR] Plugin 'InnoDB' init function returned error
今天一大早到公司,计划把开发环境的mysql升级到5.7.15,干净关闭系统后,把目录从5.6指向到5.7,一切正常,重新指向5.6启动时,报下列错误: 2016-10-31 08:13:14 869 ...
- MariaDB报错Plugin 'InnoDB' init function returned error.解决方案
重新安装MariaDB后,服务一直启动不起来,查看日志有以下错误: InnoDB: No valid checkpoint found. InnoDB: If you are attempting d ...
- mysql innodb init function error
150414 16:23:07 [ERROR] Plugin 'InnoDB' init function returned error. 150414 16:23:07 [ERROR] Plugin ...
- 【MySQL】InnoDB: Error: checksum mismatch in data file 报错
参考:http://www.jb51.net/article/66951.htm 用5.7版本启动原5.5实例后,再用5.5启动出现以下报错 InnoDB: Error: checksum misma ...
- mysql中mysql数据库丢失报错Can't open the mysql.plugin table
180720 10:00:54 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 18 ...
- Mysql drop function xxxx ERROR 1305 (42000): FUNCTION (UDF) xxxx does not exist
mysql> drop function GetEmployeeInformationByID;ERROR 1305 (42000): FUNCTION (UDF) GetEmployeeInf ...
随机推荐
- HTML5本地存储之localStorage、sessionStorage
1.概述 localStorage和sessionStorage统称为Web Storage,它使得网页可以在浏览器端储存数据. sessionStorage保存的数据用于浏览器的一次会话,当会话结束 ...
- AD10长方形通孔焊盘的画法
1.点击工具栏中[放置焊盘]按钮 2.按键盘Tab键弹出[焊盘]对话框 3.设置[空洞信息]相关尺寸(根据自己所需实际设置) 这里左边的单选按钮选择“槽”,通孔尺寸输入20mil,长度为80mil,旋 ...
- Linux中vi显示中文乱码的问题
由于在windows下默认是gb编码,而我的vim默认是utf-8(gedit默认也是utf-8),所以打开会成乱码.修改了一下配置文件,使vi支持gb编码就好了.$vi ~/.vimrclet &a ...
- Win7下使用Telnet命令
在调试网络端口是否通畅的时候会经常使用到telnet命令,但是在Windows7系统下这个命令默认是不开启的. 开启Telnet命令的方法: 1.在开始程序里,打开控制面板. 2.在控制面板里,点击“ ...
- DataContractSerializer序列化与反序列化遇到的奇怪问题
private static void Serialize1(string filename, object obj) { var stream = new F ...
- Ubuntu下PHP的扩展
Ubuntu版本:14.04 1. 下载php-5.5.10.tar.bz2,并解压. 2. 终端进入解压后的目录php-5.5.10,运行configure.(输入命令./configure) 3 ...
- 详解shape标签
转载自:http://blog.csdn.net/harvic880925/article/details/41850723 一.简单使用 刚开始,就先不讲一堆标签的意义及用法,先简单看看shape标 ...
- java框架篇---spring IOC 实现原理
IOC(DI):其实这个Spring架构核心的概念没有这么复杂,更不像有些书上描述的那样晦涩.java程序员都知道:java程序中的每个业务逻辑至少需要两个或以上的对象来协作完成,通常,每个对象在使用 ...
- 构造Lambda表达式
/// <summary> /// 构造Lambda表达式 /// </summary> /// <typeparam name="T">< ...
- iOS-UISegmentedControl-隐藏边框
原理: 1. 用tintColor属性,把整个UISEgmentControl 设置成为透明色. 2. 设置正常状态下的titleTextAttributes.和选中状态下的titleTextAttr ...