Rootop 服务器运维与web架构

Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed

| 暂无评论

InnoDB: Error: log file ./ib_logfile0 is of different size 0 268435456 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!

130201 17:59:44 [ERROR] Plugin ‘InnoDB’ init function returned error.
130201 17:59:44 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
130201 17:59:44 [ERROR] Unknown/unsupported storage engine: InnoDB
130201 17:59:44 [ERROR] Aborting

解决方法:来自:http://blog.csdn.net/jackxinxu2100/article/details/6747462

当在未正常关闭server的情况下对其参数修改,修改之后没有删除ib_logfile文件,ib_logfile文件中记录些innodb引擎非常有用的信息比如说默认的innodb默认的配置信息,又是在未正常关闭server情况下操作的,所以导致重启后的server不支持innodb引擎。
rm -rf ib_logfile*
正确配置参数
重启server。

第二种情况:

mysql安装完,用的my-innodb-heavy-4G.cnf作为默认配置文件。
开始default-storage-engine = MYISAM 启动数据库没问题,之后改为InnoDB就报错,无法启动,查看日志:
130224 07:33:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
130224  7:33:56 InnoDB: The InnoDB memory heap is disabled
130224  7:33:56 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130224  7:33:56 InnoDB: Compressed tables use zlib 1.2.3
130224  7:33:57 InnoDB: Initializing buffer pool, size = 2.0G
InnoDB: mmap(2197815296 bytes) failed; errno 12
130224  7:33:57 InnoDB: Completed initialization of buffer pool
130224  7:33:57 InnoDB: Fatal error: cannot allocate memory for the buffer pool
130224  7:33:57 [ERROR] Plugin ‘InnoDB’ init function returned error.
130224  7:33:57 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
130224  7:33:57 [ERROR] Unknown/unsupported storage engine: InnoDB
130224  7:33:57 [ERROR] Aborting
130224  7:33:57 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
130224 07:33:57 mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.localdomain.pid ended
原因是my.cnf中innodb_buffer_pool_size = 2G 参数默认为2G,我实际内存才512M(虚拟机),内存不足导致上面报错。注释掉启动解决。

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/1577.html

作者:Venus

服务器运维与性能优化

发表回复