Solution to MySQL being unable to start due to excessive memory configuration

Solution to MySQL being unable to start due to excessive memory configuration

Problem Description

MySQL reports an error when starting. Check the error log.

[ERROR] InnoDB: Cannot allocate memory for the buffer pool

(Memory required by the InnoDB engine cannot be allocated from the cache pool)

Solution

You need to adjust the size settings of innodb_buffer_pool_size and key_buffer_size in the MySQL configuration file my.cnf, and increase the memory allocation appropriately, generally adjusted to half of the system memory.

First use free -m to check the system memory size and check that it is 1G memory


Then vi /etc/my.cnf and adjust innodb_buffer_pool_size、key_buffer_size to 500M each.

Note: my.cnf is subject to the actual configuration file path.

Restart OK

Summarize

The above is the full content of this article. I hope that the content of this article can bring some help to your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support of 123WORDPRESS.COM.

You may also be interested in:
  • How to solve the problem that MySQL cannot start because it cannot create temporary files
  • After reinstalling MySQL, the MySQL service cannot be started
  • Solution to MySQL 5.7 not starting under Windows
  • Mysql5.7 service cannot be started. Graphical solution tutorial
  • How to solve the problem that MySQL cannot start because it cannot create PID

<<:  Sample code on how to implement page caching in vue mobile project

>>:  Architecture and component description of docker private library Harbor

Recommend

Summary of the application of transition components in Vue projects

​Transtion in vue is an animation transition enca...

Summary of commonly used operators and functions in MySQL

Let’s build the data table first. use test; creat...

Causes and solutions for front-end exception 502 bad gateway

Table of contents 502 bad gateway error formation...

Solutions to Mysql index performance optimization problems

The optimization created by MySQL is to add index...

HTML head tag detailed introduction

There are many tags and elements in the HTML head ...

A brief introduction to the command line tool mycli for operating MySQL database

GitHub has all kinds of magic tools. Today I foun...

This article takes you to explore NULL in MySQL

Table of contents Preface NULL in MySQL 2 NULL oc...

JavaScript quickly implements calendar effects

This article example shares the specific code of ...

JavaScript to implement search data display

This article shares the data display code for Jav...

Implementation example of uploading multiple attachments in Vue

Table of contents Preface Core code File shows pa...

Detailed explanation of flex and position compatibility mining notes

Today I had some free time to write a website for...

Detailed explanation of the usage of setUp and reactive functions in vue3

1. When to execute setUp We all know that vue3 ca...

Tips for writing concise React components

Table of contents Avoid using the spread operator...