-
Table 'xxxxxxxx' is marked as crashed and should be repairedFull-Stack/Back-end 2008. 1. 28. 22:22
Table 'xxxxxxxx' is marked as crashed and should be repaired..
analyze table tableName; ==> 테이블에 대한 보고서 작성
repair table tableName; ==> 테이블 복원여러번 시도해서 복구가 안될때에는 myisamchk로 복구한다.(DB 서버를 끄고 할것)
예) 깨진 테이블 명 TEST
mysql> repair table TEST;
+-----------------+--------+----------+----------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+----------------------------------------------+
| DBERING.TEST | repair | info | Wrong bytesec: 0- 0- 0 at 40584; Skipped |
| DBERING.TEST | repair | warning | Number of rows changed from 1239 to 1236 |
| DBERING.TEST | repair | status | OK |
+-----------------+--------+----------+----------------------------------------------+
3 rows in set (0.08 sec)
mysql> analyze table TEST;
+-----------------+---------+----------+-----------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+---------+----------+-----------------------------+
| DBERING.TEST | analyze | status | Table is already up to date |
+-----------------+---------+----------+-----------------------------+
1 row in set (0.00 sec)
mysql> repair table TEST;
+-----------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+----------+
| DBERING.TEST | repair | status | OK |
+-----------------+--------+----------+----------+
1 row in set (0.02 sec)댓글