Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with the failure to start mysql under linux

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to deal with the failure to start mysql under linux. The content of the article is carefully selected and edited by the author. It has a certain pertinence and is of great significance to everyone's reference. The following is to understand with the author how to deal with the failure of starting mysql under linux.

First, view the startup log

Locate the mysql profile location / etc/my.cf

The error message is as follows:

NnoDB: Data file. / ibdata1 is of a different size 768 pages (rounded down to MB) than specified in the. CNF file 1280 pages!

Cause of error:

The data file size does not match.

Linux video tutorial recommended: linux video tutorial

2. Check the file size of ibdata1

Locate the location where mysql is installed / var/run/mysql

Examples are as follows:

[root@localhost mysql] # ll-lhtotal 21M Murray RW Murray RW Murray Murray. 1 mysql mysql 10M Apr 1 09:23 ibdata1-rw-rw----. 1 mysql mysql 5.0M Apr 1 09:23 ib_logfile0-rw-rw----. 1 mysql mysql 5.0M Mar 13 07:43 ib_logfile1drwx-. 2 mysql mysql 4.0K Mar 13 07:43 mysqldrwx-. 2 mysql mysql 4.0K Mar 13 07:43 test

3. Set the size of ibdata1 to be the same as the size viewed / etc/my.cnf

Examples are as follows:

Datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockinnodb_data_file_path=ibdata1:10M;ibdata2:10M:autoextend

After reading the above about how to deal with the failure to start mysql under linux, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report