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

Start the error report after mysql is powered off

2025-04-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The mysql database connected to a network management system cannot be started. The database version 5.5.36 views the error log information:

Looking at the MySQL startup log, we found "InnoDB: The log sequence number in ibdata files does not match", "InnoDB: the log sequence number in the ib_logfiles!", "Database page corruption on disk or a failed" and "Ending processing because of a corrupt database page." And other error messages, the database is the same as the data file corruption did not start successfully.

There are many reasons for data file corruption, and the most common reason is that the transaction ID of data file and log file is inconsistent due to the power outage of the server.

By searching for "Database was not shut down normally!" in the startup log, 19 places are found, proving that the last time MySQL was not stopped properly. When MySQL starts, it will detect whether it stopped normally last time. If it is abnormal, it will print this error message and try to fix it automatically. If the repair is not successful, the startup will be abandoned.

Start MySQL as read-only. After startup, the database does not have full function, but data backup operation can be carried out.

Set the parameter innodb_force_recovery=6 in [mysqld] in the MySQL parameter file esight.ini

Then execute MySQL\ bin\ startup.bat to start MySQL. If it cannot be started, it can be judged that it cannot be repaired, and reinstall eSight can be considered directly.

2, use mysqldump to back up each database separately, each database will have a separate backup file, so that for the sake of a database damage will not affect the recovery of other data.

Mysqldump-- force-uroot-p #-databases mysql > > mysql_backup.sql

Mysql.exe-uroot-p

< mysql_backup.sql >

Mysql_recover_result.txt 2 > & 1

If executed correctly, the mysql_recover_result.txt file is empty. Otherwise, there will be an error log.

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

Database

Wechat

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

12
Report