Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of insufficient memory in MySQL

2025-05-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Xiaobian to share with you MySQL memory shortage solution, I believe most people do not know how, so share this article for your reference, I hope you read this article after a lot of gains, let us go to understand it!

MySQL memory shortage solution: 1, increase swap swap space, code is [dd if=/dev/zero of=/swapfile bs=1M count=1024];2, increase automatic mount, in the file [/etc/fstab add/swapfileswap].

MySQL memory shortage solution:

The requested URL/log/mysql/error.log was not found on this server.

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. After the query, it is because the memory is insufficient, check the memory

Add swap swap space to solve the problem:

dd if=/dev/zero of=/swapfile bs=1M count=1024

mkswap /swapfile

swapon /swapfile

4. Add automatic mount:

Add/swapfile swap swap defaults 0 0 to/etc/fstab

service mysql start started successfully

5. Remarks:

Generate empty file

dd if=/dev/zero of=1.txt bs=1M count=2 Generate an empty file of the specified size if= filename: input filename of= filename: output filename bs= byte size count= number above is MySQL memory shortage solution all content, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report