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

A simple way to solve the startup failure caused by insufficient memory in MySQL

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The following mainly brings you a simple way to solve the startup failure caused by insufficient memory in MySQL. I hope that the simple way to solve the startup failure caused by insufficient memory in MySQL can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.

1. Failed to start mysql all the time. Check error log / var/log/mysql/error.log

two。 The main error messages are as follows:

?

1234567 [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 query, it is due to insufficient memory. Check the memory.

Increase swap swap space to solve the problem:

?

123dd if=/dev/zero of=/swapfile bs=1m count=1024mkswap / swapfileswapon / swapfile

4. Add automatic mount:

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

Service mysql start started successfully

5. Remarks:

Generate an empty file

?

12345dd if=/dev/zero of=1.txt bs=1m count=2 generates an empty file of specified size if= filename: input filename of= filename: output filename bs= byte size count= number

For the above simple method to solve the startup failure caused by insufficient memory in MySQL, do you think it is very helpful? If you need to know more, please continue to follow our industry information. I'm sure you'll like it.

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

Wechat

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

12
Report