Get the App
SLTechnology News&Howtos  ›  Database  › 

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

Shulou Source: shulou.com Published: 2022-06-01 19:38:21 09月30日 Update

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.

Tags: File memory filename method success following text content size error generation number information remarks bytes actual nonsense log more usefulness purpose Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux Shulou Tech Info OPPO Reno Xiaomi