What to do if mysql fails to start under centos system

王林
Release: 2020-03-20 14:38:12
Original
2872 people have browsed it

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
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!