MYSQL is marked as crashed and should are repaired solutions

Source: Internet
Author: User

Problem analysis


Error causes, some netizens say is frequent query and update [datasheet] table caused by indexing error, because my page is not static generation, but dynamic page, so I agree with this argument. It is also said that the MySQL database for some reason has been damaged, such as: The database server bursts of power, in the database table to provide services to the table of the original file to do some kind of operation may cause the MySQL database table is corrupted and can not read data. In short, the damage to the table is caused by some unpredictable problems.


Solutions


Fix the following find Myisamchk under your Mysql/bin

On the command line, enter:

The code is as follows Copy Code
Myisamchk-c-R d:mysqldataabc. Myi

Can be:)


Foreign Reference


Myisamchk
/etc/init.d/mysql Stopdann kann man sich mit dem Brachial-tool ans werk machen:

hist-web:/var/lib/mysql/wsu# Myisamchk smt_stats. Myi
Checking MyISAM file:smt_stats. Myi
Data records:139144 Deleted blocks:0
Myisamchk:warning:Table is marked as crashed
-Check File-size
Myisamchk:error:Size of datafile is:10473472 Should be:10473480
-Check record Delete-chain
-Check Key Delete-chain
-Check Index Reference
-Check data record references Index:1
Myisamchk:error:Found 139145 Keys of 139144
-Check Record links
Myisamchk:error:Recordlink that points outside datafile at 10473420
Myisam-table ' Smt_stats. Myi ' is corrupted
Fix it using switch "-r" or "O" Ich tat, wie mir befohlen wurde:

hist-web:/var/lib/mysql/wsu# myisamchk-r smt_stats. Myi
-Recovering (with sort) myisam-table ' smt_stats. Myi '
Data records:139144
-Fixing Index 1
Found block, points outside data file at 10473420Zur sicherheitüberprüfte ich die Tabelle:

hist-web:/var/lib/mysql/wsu# Myisamchk smt_stats. Myi
Checking MyISAM file:smt_stats. Myi
Data records:139144 Deleted blocks:0
-Check File-size
-Check record Delete-chain
-Check Key Delete-chain
-Check Index Reference
-Check data record references Index:1
-Check record Linksda alles wieder rosig aussah, Konnte Mans MySQL wieder hochfahren:

/etc/init.d/mysql start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.