在ECS实例上运行了博客网站上面有 tomcat redis nginx
mysql 但是内存有限,导致内核进程终结者 终结掉了mysql进程,然后启动mysql 就开始报错,无法启动
经过查找资料,发现有很多初级的解决办法,例如删除/etc/my.cnf 初始化数据库 指定datadir路径等等。都是复制来复制去的 千篇一律
首先查看日志吧:
-
2016-07-04 09:55:55 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.28) starting as process 24460 ...
-
2016-07-04 09:55:55 24460 [Note] Plugin 'FEDERATED' is disabled.
-
2016-07-04 09:55:55 24460 [Note] InnoDB: Using atomics to ref count buffer pool pages
-
2016-07-04 09:55:55 24460 [Note] InnoDB: The InnoDB memory heap is disabled
-
2016-07-04 09:55:55 24460 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
-
2016-07-04 09:55:55 24460 [Note] InnoDB: Memory barrier is not used
-
2016-07-04 09:55:55 24460 [Note] InnoDB: Compressed tables use zlib 1.2.3
-
2016-07-04 09:55:55 24460 [Note] InnoDB: Using CPU crc32 instructions
-
2016-07-04 09:55:55 24460 [Note] InnoDB: Initializing buffer pool, size = 128.0M
-
InnoDB: mmap(137363456 bytes) failed; errno 12
-
2016-07-04 09:55:55 24460 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
-
2016-07-04 09:55:55 24460 [ERROR] Plugin 'InnoDB' init function returned error.
-
2016-07-04 09:55:55 24460 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
-
2016-07-04 09:55:55 24460 [ERROR] Unknown/unsupported storage engine: InnoDB
-
2016-07-04 09:55:55 24460 [ERROR] Aborting
排查办法:
-
[root@dfd data]# free -m
-
total used free shared buffers cached
-
Mem: 994 597 397 2 5 40
-
-/+ buffers/cache: 551 443
-
Swap: 0 0 0
解决办法:
修改my.cnf
innodb_buffer_pool_size=28M即可
Buffuers不足初始化失败!
阅读(2141) | 评论(0) | 转发(0) |