Home>Article>Operation and Maintenance> What to do if mysql fails to start under centos system

What to do if mysql fails to start under centos system

王林
王林 Original
2020-03-20 14:38:12 2975browse

What to do if mysql fails to start under centos system

Problem:

Upgraded MySQL 5.1 to MySQL 5.6. After the upgrade, it failed to start MySQL.

Solution:

Open the MySQL log file and enter the command:

vim /var/log/mysqld.log

Find the error message in the log file. The error here is that the ibdata1 file size parameter has been modified, causing it to be different from the default value.

What to do if mysql fails to start under centos system

(Recommended tutorial:centos usage tutorial)

Solution:

Open the MySQL configuration file, Enter the command:

vim /etc/my.cnf

As stated in the error message: the value of ibdata1 is 640 pages and the value in the configuration file is 768 pages. So just modify the value of ibdata1 in innodb_data_file_path in my.cnf.

First calculate the initial value of ibdata1: 640/64 = 10M

The final configuration is:

innodb_data_file_path = ibdata1:10M:autoextend

If my.cnf does not have this configuration, just add it.

What to do if mysql fails to start under centos system

Related video tutorial recommendations:linux video tutorial

The above is the detailed content of What to do if mysql fails to start under centos system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn