今天重启测试环境的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”改小,重启就可以了。