mysql修復表


數據庫Table xxx is marked as crashed and should be repaired錯誤的解決方法服務器斷電等原因可能導致數據表損壞,導致訪問的時候提示:Table xxx is marked as crashed and should be repaired其中xxx為表的名稱。

找到對應的表,使用 repair table table_name; 進行修復

mysql> select * from log_check_user;
ERROR 1194 (HY000): Table 'log_check_user' is marked as crashed and should be repaired
mysql> repair table log_check_user;
+----------------------+--------+----------+-------------------------------------------------+
| Table                | Op     | Msg_type | Msg_text                                        |
+----------------------+--------+----------+-------------------------------------------------+
| sg456.log_check_user | repair | info     | Wrong bytesec:   0-  0-  0 at 68974624; Skipped |
| sg456.log_check_user | repair | warning  | Number of rows changed from 428999 to 428998    |
| sg456.log_check_user | repair | status   | OK                                              |
+----------------------+--------+----------+-------------------------------------------------+
3 rows in set (24.87 sec)

mysql> select * from log_check_user;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM