内存不足导致mysql无法启动

Plugin ‘FEDERATED’ is disabled.
160403 12:30:35 InnoDB: The InnoDB memory heap is disabled
160403 12:30:35 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160403 12:30:35 InnoDB: Compressed tables use zlib 1.2.7
160403 12:30:35 InnoDB: Using Linux native AIO
160403 12:30:35 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12  当出现这条提示时是内存不够
160403 12:30:35 InnoDB: Completed initialization of buffer pool
160403 12:30:35 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160403 12:30:35 [ERROR] Plugin ‘InnoDB’ init function returned error.
160403 12:30:35 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
160403 12:30:35 [ERROR] Unknown/unsupported storage engine: InnoDB
160403 12:30:35 [ERROR] Aborting

invoke-rc.d: initscript mysql, action “start” failed.
dpkg: error processing mysql-server-5.5 (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (–configure):
dependency problems – leaving unconfigured
Errors were encountered while processing:
mysql-server-5.5
mysql-server

看到以上内容无需重装mysql。直接清除缓存,free -m查看状况,echo 1 > /proc/sys/vm/drop_caches 执行后即时清理,重启服务器释放swap。log文件在/var/log。查看前可以通过ls -l查看log文件大小,tail -100 文件名 可以查看最后100行内容


已发布

分类

作者:

标签

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注