牛骨文教育服务平台(让学习变的简单)
博文笔记

内存不够用,启动不了MySQL

创建时间:2010-09-10 投稿人: 浏览次数:142

今天重启测试环境的MySQL,总是报错:

 

[root@XXXX etc]# /etc/init.d/mysql restart
MySQL manager or server PID file could not be found![FAILED]
Starting MySQL.Manager of pid-file quit without updating file.[FAILED]
[root@XXXX etc]#

 

检查了一下log,发现错误:

100910  1:43:04 [Note] Plugin "FEDERATED" is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: mmap(2195718144 bytes) failed; errno 12
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
100910  1:43:04 [ERROR] Plugin "InnoDB" init function returned error.
100910  1:43:04 [ERROR] Plugin "InnoDB" registration as a STORAGE ENGINE failed.
100910  1:43:04 [ERROR] Unknown/unsupported table type: INNODB
100910  1:43:04 [ERROR] Aborting

 

再看看当前的内存使用情况:

[root@XXXX logs]# free -m
             total       used       free     shared    buffers     cached
Mem:          2011       1960         50          0        150        192
-/+ buffers/cache:       1617        394
Swap:         2015       2014          1
[root@XXXX logs]#

把“innodb_buffer_pool_size”改小,重启就可以了。

声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。