問題分析:錯誤產生原因,有網友說是頻繁查詢和更新[數據表]表造成的索引錯誤,因為我的頁面沒有靜態生成,而是動態頁面,因此比較同意這種說法。還有說法為是MYSQL數據庫因為某種原因而受到了損壞,如:數據庫服務器突發性的斷電、在提在數據庫表提供服務時對表的原文件進行某種操作都有可能導致MYSQL數據庫表被損壞而無法讀取數據。總之就是因為某些不可測的問題造成表的損壞。
解決辦法:修復如下在你的mysql/bin下面找到myisamchk,在命令行中輸入:
myisamchk -c -r d:mysqldataabc.MYI
即可.
國外參考:
- 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 that points outside data file at 10473420Zur Sicherheit überprüfte ich die Tabelle erneut:
- 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 --Vevb.com
- - 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 man MySQL wieder hochfahren:
- /etc/init.d/mysql start
新聞熱點
疑難解答