A perfect solution for MySQL startup failure due to memory Insufficiency

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.