MyIsam 表 “ Incorrect key file for table 't_ '; try to repair it”
轉載自:https://www.cnblogs.com/zjoch/archive/2013/08/19/3267131.html
今天mysql突然出現以下錯誤:
mysql> select * from test;
ERROR 1034 (HY000): Incorrect key file for table ‘test’; try to repair it
首先通過repair table修復:
mysql> repair table test;
+—————+——–+———-+———————————————————+
| Table | Op | Msg_type | Msg_text |
+—————+——–+———-+———————————————————+
| test.test | repair | Error | Incorrect key file for table ‘test’; try to repair it |
| test.test | repair | error | Corrupt
如果還是沒用,執行下面命令
mysql> repair table test USE_FRM;
+—————+——–+———-+———————————————————+
| Table | Op | Msg_type | Msg_text |
+—————+——–+———-+———————————————————+
| test.test | repair | Error |Number of rows changed from 0 to 110423 |
| test.test | repair | status | OK
按理應該可以了。
如果還是沒用,則退出mysql,執行如下修復動作:
myisamchk -of /var/lib/mysql/test/test.MYI
myisamchk -r /var/lib/mysql/test/test.MYI
myisamchk safe-recover /var/lib/mysql/test/test.MYI
再重啟mysql後應該可以正常了。
相關文章
- MySQL執行語句報Incorrect key file for table '/tmp/#sql_.MYI'; try to repair itMySqlAI
- mysql Incorrect key file for table ‘/xxxxxxxx/xxxx.MYI'; try to repair itMySqlAI
- Incorrect key file for table '/tmp/....'錯誤的解決--記錄
- MySQL InnoDB File-Per-Table表空間MySql
- With KEY & With Table KEY 的使用
- 利用mysql slave 修復master MyISAM tableMySqlAST
- mysql : repair with keycache 的一個處理MySqlAI
- MySQL錯誤Incorrect file format解決方案薦MySqlORM
- 解決 eclipse 上 Keystore was tampered with, or password was incorrectEclipse
- ssis multiple table to one file
- MySQL 引數- Innodb_File_Per_Table(獨立表空間)MySql
- 記一次 打包報錯:Keystore was tampered with, or password was incorrect
- HPUX Error 23 File table overflowUXError
- mysql RSA private key file not foundMySql
- myisampack工具(MyISAM表壓縮工具)
- MySQL 5.5 MyISAM表鎖測試MySql
- msck repair命令 修復表分割槽AI
- 為Zabbix MySQL設定獨立表空間innodb_file_per_tableMySql
- Generate BKS File( Bouncy Castle KeyStore)AST
- MyISAM表的儲存格式---行格式
- MyISAM分割槽表遷移 && 合併
- MySQL錯誤修復:Table xx is marked as crashed and last (automatic?) repair failedMySqlASTAI
- MySQL 5.5 報錯"ERROR 1075 (42000): Incorrect table definition"MySqlError
- yum-GPG key retrieval failed: No such file or directoryAI
- Mysql中的鎖機制——MyISAM表鎖MySql
- MySQL 中的myisam內部臨時表MySql
- MySQL中innodb_file_per_table引數MySql
- Upload excel file 到 INTERNAL TABLE 的方法Excel
- MySQL實現MYISAM表批次壓縮的方法MySql
- Fence RepairAI
- MySQL5.6開始可以使用獨立表空間, innodb_file_per_table=1MySql
- 將Excel file上轉到Internal table的方法Excel
- Extracting Data from a Corrupt Table using DBMS_REPAIR or Event 10231AI
- ALTER TABLE causes auto_increment resulting key 'PRIMARY'REM
- partition table update partition-key result in changing tablespace
- Key-preserved table concept in join view (Ask Tom)View
- Flashback table with foreign key constraint.AI
- oracle 外部表 external tableOracle