mysql 运行一段时间就自动停止了,请教一下大家

2017-01-23 01:06:37 +08:00
 isphone

2017-01-22 22:37:22 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29) starting as process 2097 ...
2017-01-22 22:37:22 2097 [Note] Plugin 'FEDERATED' is disabled.
2017-01-22 22:37:22 2097 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-01-22 22:37:22 2097 [Note] InnoDB: The InnoDB memory heap is disabled
2017-01-22 22:37:22 2097 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-01-22 22:37:22 2097 [Note] InnoDB: Memory barrier is not used
2017-01-22 22:37:22 2097 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-01-22 22:37:22 2097 [Note] InnoDB: Using CPU crc32 instructions
2017-01-22 22:37:22 2097 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2017-01-22 22:37:22 2097 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-01-22 22:37:22 2097 [ERROR] Plugin 'InnoDB' init function returned error.
2017-01-22 22:37:22 2097 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-01-22 22:37:22 2097 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-01-22 22:37:22 2097 [ERROR] Aborting

2017-01-22 22:37:22 2097 [Note] Binlog end
上面是日志,请教是什么原因?谢谢

3170 次点击
所在节点    问与答
7 条回复
gamesbain
2017-01-23 01:09:31 +08:00
应该是内存不够,我也遇到过同样的问题
jarlyyn
2017-01-23 01:10:25 +08:00
google 搜 InnoDB: mmap(137363456 bytes) failed; errno 12 第一条。
isphone
2017-01-23 01:10:41 +08:00
@gamesbain 内存好像够哦,没有提示说内存不够
jarlyyn
2017-01-23 01:18:29 +08:00
@isphone

InnoDB: Cannot allocate memory for the buffer pool
xiuc001
2017-01-23 07:00:17 +08:00
内存不够吧
cyr1l
2017-01-23 08:31:03 +08:00
有可能是某些目录的权限问题,用 sudo 运行试试?
Infernalzero
2017-01-23 08:59:32 +08:00
方案 1 :系统加内存
方案 2 :配置文件里 InnoDB buffer pool size 改小

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/336346

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX