Cent OS – MySQL守护进程无法启动

我正在运行带有0.615 GB内存的AWS微型实例。

我有默认情况下最大35 MB大小的APC。

现在我重新启动了mysqld,它不会启动。 它刚刚停止。 我真的需要现在就开始运行。 它对我来说非常紧迫。

以下是日志,请分享你的经验,以什么是最快的解决scheme。

提前致谢,

140111 14:49:32 [Warning] IP address '113.10.247.183' could not be resolved: Name or service not known 140111 14:59:42 [Warning] IP address '59.53.68.15' could not be resolved: Name or service not known 140111 21:01:00 [Warning] IP address '216.99.158.94' could not be resolved: Name or service not known 140112 1:05:51 [Warning] IP address '117.41.249.134' could not be resolved: Name or service not known 140112 2:06:52 [Warning] IP address '218.205.137.122' could not be resolved: Name or service not known 140113 1:29:44 [Warning] IP address '50.23.54.2' has been resolved to the host name '50.23.54.2-static.reverse.softlayer.com', which resembles IPv4-address itself. 140113 12:49:09 [Warning] IP address '113.10.137.11' could not be resolved: Name or service not known 140114 0:36:22 [Warning] IP address '198.13.101.242' could not be resolved: Temporary failure in name resolution 140114 1:03:19 [Warning] IP address '182.18.30.92' could not be resolved: Temporary failure in name resolution 140114 18:42:41 [Warning] IP address '183.136.213.198' could not be resolved: Name or service not known 140114 23:22:28 [Warning] IP address '118.192.7.10' could not be resolved: Name or service not known 140115 7:44:59 [Warning] IP address '198.13.101.242' could not be resolved: Temporary failure in name resolution 140115 22:40:14 [Warning] IP address '111.68.3.106' could not be resolved: Temporary failure in name resolution 140116 3:15:56 [Note] /usr/libexec/mysqld: Normal shutdown 140116 3:15:56 [Note] Event Scheduler: Purging the queue. 0 events 140116 3:15:56 InnoDB: Starting shutdown... 140116 3:15:58 InnoDB: Shutdown completed; log sequence number 7223004 140116 3:15:58 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:15:58 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:15:59 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:15:59 [Note] Plugin 'FEDERATED' is disabled. 140116 3:15:59 InnoDB: The InnoDB memory heap is disabled 140116 3:15:59 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:15:59 InnoDB: Compressed tables use zlib 1.2.5 140116 3:15:59 InnoDB: Using Linux native AIO 140116 3:15:59 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:15:59 InnoDB: Completed initialization of buffer pool 140116 3:15:59 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:15:59 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:15:59 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:15:59 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:15:59 [ERROR] Aborting 140116 3:15:59 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:15:59 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:16:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:16:30 [Note] Plugin 'FEDERATED' is disabled. 140116 3:16:30 InnoDB: The InnoDB memory heap is disabled 140116 3:16:30 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:16:30 InnoDB: Compressed tables use zlib 1.2.5 140116 3:16:30 InnoDB: Using Linux native AIO 140116 3:16:30 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:16:30 InnoDB: Completed initialization of buffer pool 140116 3:16:30 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:16:30 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:16:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:16:30 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:16:30 [ERROR] Aborting 140116 3:16:30 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:16:30 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:22:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:22:54 [Note] Plugin 'FEDERATED' is disabled. 140116 3:22:54 InnoDB: The InnoDB memory heap is disabled 140116 3:22:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:22:54 InnoDB: Compressed tables use zlib 1.2.5 140116 3:22:54 InnoDB: Using Linux native AIO 140116 3:22:54 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:22:54 InnoDB: Completed initialization of buffer pool 140116 3:22:54 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:22:54 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:22:54 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:22:54 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:22:54 [ERROR] Aborting 140116 3:22:54 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:22:54 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:25:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:25:03 [Note] Plugin 'FEDERATED' is disabled. 140116 3:25:03 InnoDB: The InnoDB memory heap is disabled 140116 3:25:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:25:03 InnoDB: Compressed tables use zlib 1.2.5 140116 3:25:03 InnoDB: Using Linux native AIO 140116 3:25:03 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:25:03 InnoDB: Completed initialization of buffer pool 140116 3:25:03 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:25:03 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:25:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:25:03 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:25:03 [ERROR] Aborting 140116 3:25:03 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:25:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:27:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:27:36 [Note] Plugin 'FEDERATED' is disabled. 140116 3:27:36 InnoDB: The InnoDB memory heap is disabled 140116 3:27:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:27:36 InnoDB: Compressed tables use zlib 1.2.5 140116 3:27:36 InnoDB: Using Linux native AIO 140116 3:27:36 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:27:36 InnoDB: Completed initialization of buffer pool 140116 3:27:36 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:27:36 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:27:36 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:27:36 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:27:36 [ERROR] Aborting 140116 3:27:36 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:27:36 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:37:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:37:37 [Note] Plugin 'FEDERATED' is disabled. 140116 3:37:37 InnoDB: The InnoDB memory heap is disabled 140116 3:37:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:37:37 InnoDB: Compressed tables use zlib 1.2.5 140116 3:37:37 InnoDB: Using Linux native AIO 140116 3:37:37 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:37:37 InnoDB: Completed initialization of buffer pool 140116 3:37:37 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:37:37 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:37:37 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:37:37 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:37:37 [ERROR] Aborting 140116 3:37:37 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:37:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:39:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:39:10 [Note] Plugin 'FEDERATED' is disabled. 140116 3:39:10 InnoDB: The InnoDB memory heap is disabled 140116 3:39:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:39:10 InnoDB: Compressed tables use zlib 1.2.5 140116 3:39:10 InnoDB: Using Linux native AIO 140116 3:39:10 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:39:10 InnoDB: Completed initialization of buffer pool 140116 3:39:10 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:39:10 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:39:10 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:39:10 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:39:10 [ERROR] Aborting 140116 3:39:10 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:39:10 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:40:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:40:03 [Note] Plugin 'FEDERATED' is disabled. 140116 3:40:03 InnoDB: The InnoDB memory heap is disabled 140116 3:40:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:40:03 InnoDB: Compressed tables use zlib 1.2.5 140116 3:40:03 InnoDB: Using Linux native AIO 140116 3:40:03 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:40:03 InnoDB: Completed initialization of buffer pool 140116 3:40:03 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:40:03 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:40:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:40:03 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:40:03 [ERROR] Aborting 140116 3:40:03 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:40:03 mysqld_safe mysqld from pid file /var/lib/mysqld/mysqld.pid ended 140116 03:41:28 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:41:28 [Note] Plugin 'FEDERATED' is disabled. 140116 3:41:28 InnoDB: The InnoDB memory heap is disabled 140116 3:41:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:41:28 InnoDB: Compressed tables use zlib 1.2.5 140116 3:41:28 InnoDB: Using Linux native AIO 140116 3:41:28 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:41:28 InnoDB: Completed initialization of buffer pool 140116 3:41:28 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:41:28 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:41:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:41:28 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:41:28 [ERROR] Aborting 140116 3:41:28 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:41:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:43:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:43:21 [Note] Plugin 'FEDERATED' is disabled. 140116 3:43:21 InnoDB: The InnoDB memory heap is disabled 140116 3:43:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:43:21 InnoDB: Compressed tables use zlib 1.2.5 140116 3:43:21 InnoDB: Using Linux native AIO 140116 3:43:21 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:43:21 InnoDB: Completed initialization of buffer pool 140116 3:43:21 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:43:21 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:43:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:43:21 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:43:21 [ERROR] Aborting 140116 3:43:21 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:43:21 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 140116 03:44:43 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 140116 3:44:43 [Note] Plugin 'FEDERATED' is disabled. 140116 3:44:43 InnoDB: The InnoDB memory heap is disabled 140116 3:44:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140116 3:44:43 InnoDB: Compressed tables use zlib 1.2.5 140116 3:44:43 InnoDB: Using Linux native AIO 140116 3:44:43 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:44:43 InnoDB: Completed initialization of buffer pool 140116 3:44:43 InnoDB: Fatal error: cannot allocate memory for the buffer pool 140116 3:44:43 [ERROR] Plugin 'InnoDB' init function returned error. 140116 3:44:43 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 140116 3:44:43 [ERROR] Unknown/unsupported storage engine: InnoDB 140116 3:44:43 [ERROR] Aborting 140116 3:44:43 [Note] /usr/libexec/mysqld: Shutdown complete 140116 03:44:43 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 

我也尝试升级MySQL。

 Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck Running 'mysqlcheck with default connection arguments mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect FATAL ERROR: Upgrade failed 

以下是日志的重要部分:

 140116 3:15:59 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 140116 3:15:59 InnoDB: Completed initialization of buffer pool 140116 3:15:59 InnoDB: Fatal error: cannot allocate memory for the buffer pool 

(Errno 12是“不能分配内存”)

所以我们看到MySQL试图分配128 MB,但是没有做到这一点。 这意味着你的实例没有足够的内存。

这可能是你只是有东西在运行,正在泄漏内存,重新启动实例将启动并运行。

但更有可能的是,您需要遍历所有进程,查看正在使用的内存,并适当调整它们以在微型实例中运行,或者升级实例大小。