最近有一台主機資料表損壞,在phpmyadmin找不到修復資料表,在命令模式中下mysql> REPAIR TABLE table_name 也沒反應,整個就是晴天霹靂,後來google了一些資料 發現由 可由mysqlcheck 來解决

# mysqlcheck -u root -p DBNAME --auto-repair
Enter password:

aaaa_house.apac_house_detail
warning : Table is marked as crashed
warning : 1 client is using or hasn't closed the table properly
error : Record at pos: 1200644676 is not remove-marked
error : record delete-link-chain corrupted
error : Corrupt
aaaa_house.apac_house_lvr OK
aaaa_house.area OK
aaaa_house.city OK
aaaa_house.road OK

Repairing tables
aaaa_house.apac_house_detail
info : Found block with too small length at 44429192; Skipped
info : Wrong block with wrong total length starting at 58259228
info : Found block with too small length at 215112820; Skipped
info : Found block with too small length at 328154432; Skipped
info : Wrong block with wrong total length starting at 345686828
info : Found block with too small length at 367765756; Skipped
info : Found block with too small length at 376318364; Skipped
info : Found block with too small length at 419885920; Skipped
info : Found block with too small length at 431636492; Skipped
info : Found block with too small length at 445423132; Skipped
info : Found block with too small length at 510466488; Skipped
info : Wrong block with wrong total length starting at 531347540
info : Wrong block with wrong total length starting at 560998020
info : Found block with too small length at 728619348; Skipped
info : Found block with too small length at 772980632; Skipped
info : Wrong block with wrong total length starting at 792173856
info : Found block with too small length at 793868940; Skipped
info : Found block with too small length at 847807640; Skipped
info : Wrong bytesec: 56- 54- 52 at 1269482604; Skipped
info : Found block with too small length at 975549692; Skipped
info : Wrong block with wrong total length starting at 1035592864
info : Found block with too small length at 1035743140; Skipped
info : Found block with too small length at 1055851784; Skipped
info : Found block with too small length at 1055853628; Skipped
info : Found block with too small length at 1070897632; Skipped
info : Found block with too small length at 1070927876; Skipped
info : Found block with too small length at 1076702180; Skipped
info : Found block with too small length at 1089001924; Skipped
info : Found block with too small length at 1110287636; Skipped
info : Found block with too small length at 1129701568; Skipped
info : Found block with too small length at 1149675460; Skipped
info : Found block with too small length at 1193879612; Skipped
info : Found block with too small length at 1193881420; Skipped
info : Found block with too small length at 1219622552; Skipped
info : Found block with too small length at 1228098460; Skipped
info : Found block with too small length at 1228099060; Skipped
info : Found block with too small length at 1228099264; Skipped
info : Found block with too small length at 1228099672; Skipped
info : Found block with too small length at 1228099868; Skipped
info : Found block with too small length at 1228100276; Skipped
info : Found block with too small length at 1228103744; Skipped
info : Found block with too small length at 1228103952; Skipped
info : Found block with too small length at 1228105772; Skipped
info : Found block with too small length at 1228106188; Skipped
info : Found block with too small length at 1244293820; Skipped
info : Found block with too small length at 1245480172; Skipped
info : Found block with too small length at 1245495872; Skipped
info : Found block with too small length at 1251343336; Skipped
info : Found block with too small length at 1258847628; Skipped
info : Found block with too small length at 1258848852; Skipped
info : Found block with too small length at 1258865256; Skipped
info : Found block with too small length at 1260876812; Skipped
info : Found block with too small length at 1261982764; Skipped
info : Found block with too small length at 1262946020; Skipped
info : Found block with too small length at 1268808404; Skipped
info : Found block with too small length at 1273385776; Skipped
info : Wrong block with wrong total length starting at 1273386372
info : Found block with too small length at 1281151260; Skipped
info : Found block with too small length at 1281151468; Skipped
info : Found block with too small length at 1281151876; Skipped
info : Found block with too small length at 1290223292; Skipped
info : Found block with too small length at 1291970860; Skipped
info : Found block with too small length at 1291976652; Skipped
info : Found block with too small length at 1291977932; Skipped
info : Found block with too small length at 1291979872; Skipped
info : Found block with too small length at 1291982464; Skipped
info : Found block with too small length at 1291985616; Skipped
info : Found block with too small length at 1291985696; Skipped
info : Found block with too small length at 1291986880; Skipped
info : Found block with too small length at 1291989072; Skipped
info : Found block with too small length at 1291990168; Skipped
info : Found block with too small length at 1291990464; Skipped
info : Found block with too small length at 1291990524; Skipped
info : Found block with too small length at 1291993232; Skipped
info : Found block with too small length at 1291995096; Skipped
info : Found block with too small length at 1291995264; Skipped
info : Found block with too small length at 1291997840; Skipped
info : Found block with too small length at 1292000644; Skipped
info : Found block with too small length at 1292001376; Skipped
info : Found block with too small length at 1292002668; Skipped
info : Found block with too small length at 1292014052; Skipped
info : Found block with too small length at 1292014112; Skipped
info : Found block with too small length at 1308619908; Skipped
info : Found block with too small length at 1308620108; Skipped
info : Found block with too small length at 1310663264; Skipped
info : Found block with too small length at 1310663484; Skipped
info : Found block with too small length at 1310663884; Skipped
info : Found block with too small length at 1310664292; Skipped
info : Found block with too small length at 1310665120; Skipped
warning : Number of rows changed from 3940374 to 3940275
status : OK

加上 --auto-repair 即可自動修復

創作者介紹

Linux 技術資源站

翰 發表在 痞客邦 PIXNET 留言(0) 人氣()