Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the problem of quot;is marked as crashed and should be repaired" in big data

Shulou Source: shulou.com Published: 2022-06-01 17:30:29 10月02日 Update

This article is about how to solve the "is marked as crashed and should be repaired" problem in big data. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it with the editor.

Cause of phenomenon exec failed:Table'. / xxx/xxx_Table' is marked as crashed and should be repaired

The specific reason is not very clear to me. After searching the information, there are several opinions as follows:

Update the table frequently (I don't think this is very reliable. After so many years of mysql, there is still some stability)

Server power outage,

Disk expansion

Kill-9

Solution

Step 1: back up a corrupted table or database

Step 2: use the mysqlcheck tool that comes with mysql and add the-- auto-repair option to fix it.

Mysqlcheck-u root-p password table_name-- auto-repair

In addition, mysqlcheck has the following features: for safety reasons, the following two methods are not recommended in a production environment

Mysqlcheck-a-o-r-p / / check optimization and repair all databases mysqlcheck-A-o-r database name-p / / repair the specified database

Meaning of the parameter:

-a = Analyse given tables. / / analyze the data sheet

-c = Check table for errors / / check for incorrect (corrupted) tables in the database

-o = Optimise table / / optimize the data sheet

-r = Can fix almost anything except unique keys that aren't unique / / repair the corrupted data table

-m =-medium-check

The above is how to solve the "is marked as crashed and should be repaired" problem in big data. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Data database datasheet fault cause more knowledge article check practical clear frequent security function parameter name meaning backup years that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei OPPO Reno Apple MariaDB NVidia