A perfect solution for MySQL startup failure due to memory Insufficiency
1. Failed to start MySQL. View error logs/var/log/mysql/error.log
2. The main error messages are as follows:
[ERROR] InnoDB: mmap(136151040 bytes) failed; errno 12[ERROR] InnoDB: Cannot allocate memory for the buffer pool[ERROR] InnoDB: Plugin initialization aborted with error Generic error[ERROR] Plugin 'InnoDB' init function returned error.[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.[ERROR] Failed to initialize plugins.[ERROR] Aborting
3. Check the memory because the memory is insufficient.
Add swap space to solve the problem:
dd if=/dev/zero of=/swapfile bs=1M count=1024mkswap /swapfileswapon /swapfile
4. Add automatic mounting:
Add/swapfile swap defaults 0 0 to the/etc/fstab file
Service mysql start started successfully
5. Remarks:
Generate an empty file
Dd if =/dev/zero of1_1.txt bs = 1 M count = 2 generate an empty file of the specified size if = File Name: Input File Name of = File Name: output file name bs = byte size count = count
Summary
The above is a perfect solution for MySQL startup failure due to memory insufficiency. I hope it will be helpful to you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!