【发布时间】:2016-04-30 05:38:41
【问题描述】:
我有一个包含 WordPress 网站的 Amazon ec2 微型实例。从昨天开始,我的 mysql 数据库一直在崩溃说:
[ec2-user@ip-xxx-xx-xx-xxx ~]$ sudo service mysqld status
mysqld dead but subsys locked
我尝试重新启动 mysqld,但每 5 分钟后它不断崩溃并显示相同的消息 - “建立数据库连接时出错”
这是我的数据库日志文件读取的内容 -
160123 05:44:41 mysqld_safe mysqld restarted
160123 5:44:43 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 7928 ...
160123 5:44:44 [Note] Plugin 'FEDERATED' is disabled.
160123 5:44:46 InnoDB: The InnoDB memory heap is disabled
160123 5:44:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160123 5:44:46 InnoDB: Compressed tables use zlib 1.2.8
160123 5:44:46 InnoDB: Using Linux native AIO
160123 5:44:46 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160123 5:44:46 InnoDB: Completed initialization of buffer pool
160123 5:44:46 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160123 5:44:46 [ERROR] Plugin 'InnoDB' init function returned error.
160123 5:44:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160123 5:44:46 [ERROR] Unknown/unsupported storage engine: InnoDB
160123 5:44:46 [ERROR] Aborting
160123 5:44:46 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete
160123 05:44:46 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
当我在 Google 上搜索该问题的解决方案 - mysqld dead but subsys locked 时,发现的常见解决方案是创建一个交换文件。我完全按照大多数解决方案的建议做了,但由于我不精通 UNIX,我不知道我所做的是否正确。
或者,这个问题还有其他解决方案吗?请帮忙。
【问题讨论】:
标签: mysql linux unix amazon-ec2