mysql错误日志之cannot allocate the memory for the buffer pool

今天上午开发人员突然跟我说数据库挂掉了,结果启动mysql提示没有pid文件,这条信息好像没什么作用。接着查看mysql错误日志

2017-10-10 11:32:43 32447 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-10-10 11:32:43 32447 [ERROR] Plugin 'InnoDB' init function returned error.
2017-10-10 11:32:43 32447 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-10-10 11:32:44 32447 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-10-10 11:32:44 32447 [ERROR] Aborting

很明显Cannot allocate memory for the buffer pool,这句话的意思是不能给buffer pool分配内存了,free看果然所剩不多了,手动清理缓存之后启动还是失败,接着看进程什么样。果然apache有一堆没用的进程,kill掉不用的进程,或者像我一样图省事就直接优雅重启apache。再free查看剩余的内存变多了,再次启动mysql,成功。

还有一种情况就是你把innodb buffer pool值设置大一点

innodb_buffer_pool_size = 128M

具体情况具体对待

猜你喜欢

转载自blog.csdn.net/leo15561050003/article/details/78191117
今日推荐