Mysql cannot start -- cannot allocate the memory for the buffer pool, allocatebuffer

Source: Internet
Author: User

Mysql cannot start -- cannot allocate the memory for the buffer pool, allocatebuffer

Today, the development website is suddenly unavailable. When the Mysql database is down, restart it:

 mysql.server  restart

"Manager of pid-file quit without updating file" is always reported ".

Then, find out the cause. There are three problems on the Internet:

1. The hard disk is insufficient to write pid files.

2. The process is stuck. Find the mysql process and kill it and restart it.

3. for directory permission issues, find the directory written to the pid file and check whether the directory permission is the user specified to install mysql.

The above is the most common solution to this problem, but I tried it and it didn't work. So I checked the mysql. err error log file:

tail -100 mysql.err
The following error is found:


It can be seen that mysql cannot be started because of insufficient memory:

Cannot allocate the memory for the buffer pool

Then I checked the memory:

free -ml

It was found that there were indeed not enough, and there were only more than 300 M left. Therefore, first kill some other useless processes on the machine and then modify my. in the cnf configuration file, the following two fields are found: Change the former from 2g to 200 M, and change the latter to 120 M.

innodb_buffer_pool_size=200Mkey_buffer=120M
Then restart Mysql.




The mysql service cannot be started. The following is the mysql error log.

1. Pay attention to storage engine errors
Unknown/unsupported storage engine: InnoDB
2. Check the innodb parameter in the configuration file. If skip-innodb has been commented out
3. If innodb_log_file_size is reset, delete several ib_logfiles and restart the database.
 
Failed to start mysql in linux

Check whether/etc/my. cnf is incorrect.

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.