千家信息网

MySQL无法启动——cannot allocate the memory for the buffer pool

发表于:2025-01-19 作者:千家信息网编辑
千家信息网最后更新 2025年01月19日,2017-08-13 13:40:27 19011 [Note] InnoDB: Initializing buffer pool, size = 128.0MInnoDB: mmap(1373634
千家信息网最后更新 2025年01月19日MySQL无法启动——cannot allocate the memory for the buffer pool

2017-08-13 13:40:27 19011 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2017-08-13 13:40:27 19011 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-08-13 13:40:27 19011 [ERROR] Plugin 'InnoDB' init function returned error.
2017-08-13 13:40:27 19011 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-08-13 13:40:27 19011 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-08-13 13:40:27 19011 [ERROR] Aborting
# free -m 发现内存不足

解决办法:

在my.cnf添加以下字段

innodb_buffer_pool_size=200M
key_buffer=120M








0