1. 程式人生 > >MySQL無法啟動——cannot allocate the memory for the buffer pool

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








MySQL無法啟動——cannot allocate the memory for the buffer pool