TLDR
Mysql无法重新启动,因为内存不足,请检查是否配置了适当的交换文件。
帮不上忙?如果这不是你的问题,更适合继续研究的问题是:
背景
我在EC2上建立的第一个系统就遇到了这个问题,其特点是托管在那里的wordpress站点有时会出现“建立数据库连接时出错”的情况。
日志显示的错误与OP发布的相同。我读取的错误(删除时间戳)是:内存不足错误:
InnoDB: Fatal error: cannot allocate memory for the buffer pool
没有足够的内存InnoDB无法启动
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
mysqld正在关闭,这意味着无法重新启动!
[Note] /usr/sbin/mysqld: Shutdown complete
检查/var/log/syslog并搜索mysql产生:Out of memory: Kill process 15452 (mysqld) score 93 or sacrifice child
Killed process 15452 (mysqld) total-vm:888672kB, anon-rss:56252kB, file-rss:0kB
init: mysql main process (15452) kill