当前位置:网站首页>How to solve startup failure due to insufficient MySQL memory

How to solve startup failure due to insufficient MySQL memory

2022-06-29 04:22:00 Yisu cloud

MySQL How to solve startup failure due to insufficient memory

This article mainly introduces MySQL How to solve the problem of insufficient memory startup failure , The content is detailed and easy to understand , The operation is simple and fast , It has certain reference value , I believe that after reading this article MySQL How to solve the problem of insufficient memory and startup failure will be learned in this article , Let's have a look .

MySQL How to solve startup failure due to insufficient memory

1. start-up MySQL I have been unsuccessful , Check the error log /var/log/mysql/error.log

MySQL How to solve startup failure due to insufficient memory

2. The main error messages are as follows : /var/log/mysql/error.log

[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, there is insufficient memory , Look at the memory : /var/log/mysql/error.log

MySQL How to solve startup failure due to insufficient memory

increase swap Swap space to solve problems :

dd if=/dev/zero of=/swapfile bs=1M count=1024
mkswap /swapfile
swapon /swapfile
MySQL How to solve startup failure due to insufficient memory

4. Add auto mount : /var/log/mysql/error.log

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

service mysql start  Successful launch 

5. remarks : Generate an empty file

dd if=/dev/zero of=1.txt bs=1M 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= Number 

About “MySQL How to solve startup failure due to insufficient memory ” That's all for this article , Thank you for reading ! I'm sure you're right “MySQL How to solve startup failure due to insufficient memory ” Knowledge has a certain understanding , If you want to learn more , Welcome to the Yisu cloud industry information channel .

原网站

版权声明
本文为[Yisu cloud]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202161043151902.html