Open the development site today suddenly can not use, found when the MySQL database down, to restart:
Mysql.server Restart
Always error: "Manager of Pid-file quit without updating file".
Then to find out why, Online said there are the following three aspects of the problem:
1, hard disk is not enough, unable to write PID file
2, Process card dead, find the MySQL process kill, and then restart
3, directory permissions problem, find the PID file to write directory, see if directory permissions are used to install MySQL specified user
The above is the most common solution to this problem, but I tried it without effect. So I went to check the Mysql.err error log file:
tail-100 Mysql.err
The error shown is found:
Directly you can see that because there is not enough memory, the real reason for MySQL not to start is actually:
Cannot allocate the memory for the buffer pool
Then we went to check the memory:
Free-ml
Found really insufficient, only 300 m left, so first kill off the machine on some other useless process, and then to modify the MY.CNF configuration file, found the following two fields to change the former from 2G to 200M, the latter changed to 120M.
innodb_buffer_pool_size=200mkey_buffer=120m
And then restart MySQL to do it.
MySQL cannot start--cannot allocate the memory for the buffer pool