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

Mysql database repair

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

Share

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

When the database abnormal down drops or the system restarts abnormally, you need to start the database before starting the business, check the err log, check whether the database is damaged, and start the business after repair.

The check and repair here are only for MyISAM, and the related operations are as follows:

Check the tables in the database for corruption:

Mysqlcheck-uroot-p-h227.0.0.1-P3306-c library name

Mysql database repair:

Method 1:

0. Access to the database

1. Backup table data

2. Repair table table name; # is only valid for MyISam engine-View table engine (show create table table name;)

When there is no MYI file or when the missing header is damaged, use:

Repair table table name USE_FRM

Method 2:

1. Backup table data

two。 Use mysqlcheck-r database name table name-uroot-ppwd; to repair multiple tables at once using mysqlcheck. Just list the corresponding table name after the database name (separated by a space). Or if the database name is not added with the table name, all tables in the database will be repaired.

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