天天看點

msyql 啟動報錯 找不到pid 檔案

安裝完mysql 啟動mysql 資料庫 

報錯 

Starting MySQL.The server quit without updating PID file (/app/mysql/mysql/data/mysqld.pid).[FAILED]Starting MySQL.The server quit without updating PID file (/app/mysql/mysql/data/mysqld.pid).[FAILED]

檢視報錯日志 

2017-07-11T02:23:04.368749Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12

2017-07-11T02:23:04.368761Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool

2017-07-11T02:23:04.368767Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error

2017-07-11T02:23:04.368775Z 0 [ERROR] Plugin 'InnoDB' init function returned error.

2017-07-11T02:23:04.368779Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

2017-07-11T02:23:04.368784Z 0 [ERROR] Failed to initialize plugins.

2017-07-11T02:23:04.368788Z 0 [ERROR] Aborting

判斷是 記憶體問題 

修改 buffer pool 的記憶體大小

innodb_buffer_pool_size=8M

重新開機資料庫,可以正常啟動了

本文轉自 水滴石川1 51CTO部落格,原文連結:http://blog.51cto.com/sdsca/1946238,如需轉載請自行聯系原作者