MySQL 服务无法启动,Innodb 初始化失败处理

今天在 Windows 安装部署了 MySQL 5.5.45 for Community 社区版,由于开启了很多其它的 Win 应用程序,导致内存使用过大。 平时启动都正常的 MySQL,现在启动报失败了,查了 Win 的系统事件日志和 MySQL 的 err 日志文件(如下),报如下 Innodb 初始化失败的错误:

170117  3:04:40 [Note] Plugin 'FEDERATED' is disabled.
170117  3:04:40 InnoDB: The InnoDB memory heap is disabled
170117  3:04:40 InnoDB: Mutexes and rw_locks use Windows interlocked functions
170117  3:04:40 InnoDB: Compressed tables use zlib 1.2.3
170117  3:04:40 InnoDB: Initializing buffer pool, size = 500.0M
170117  3:04:40 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .ib_logfile0 is of different size 0 922746880 bytes
InnoDB: than specified in the .cnf file 0 146800640 bytes!
170117  3:04:40 [ERROR] Plugin 'InnoDB' init function returned error.
170117  3:04:40 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170117  3:04:40 [ERROR] Unknown/unsupported storage engine: INNODB
170117  3:04:40 [ERROR] Aborting

检查 my.ini 文件的 innodb_buffer_pool_size 参数值等于 1G。后来把参数值改为 500M,重新启动 MySQL 服务,还是报如上错误。

最后根据以上提示,将 MySQL 安装目录 % MySQL_HOME%/data 目录下的日志文件 ib_logfile0 和 ib_logfile1 改名,再重新启动 MySQL 服务就可以了。

这两个日志文件如果不存在,每次启动 MySQL 服务后,都会自动创建的。

最后,故障解决。

(完)

 

 

原文地址:https://www.cnblogs.com/emojio/p/13784141.html