Table 'user' is marked as crashed and should be repaired 에러시 복구하기

  • systemddc
  • Mysql
  • 1293
  • 0


Table 'user' is marked as crashed and should be repaired



user tables crash 되어 repair 해줬습니다.


 


다음과 같은 방법으로 진행하였습니다.


 


mysql> check table user;
+-------------------------+-------+----------+----------------------------------------------------------+
| Table        | Op    | Msg_type | Msg_text                                                |
+-------------------------+-------+----------+----------------------------------------------------------+
| user | check | warning  | Table is marked as crashed                              |
| user | check | warning  | 2 clients are using or haven't closed the table properly |
| user | check | error    | Checksum for key:  9 doesn't match checksum for records  |
| user | check | error    | Corrupt                                                  |
+-------------------------+-------+----------+----------------------------------------------------------+
4 rows in set (0.69 sec)


user table 를 체크해본 결과 다음과 같은 에러 내용이 있습니다.


 


그래서 아래와 같이 repair 를 해줬습니다.
mysql> repair table user;
+-------------------------+--------+----------+----------+
| Table        | Op    | Msg_type | Msg_text |
+-------------------------+--------+----------+----------+
| user | repair | status  | OK      |
+-------------------------+--------+----------+----------+
1 row in set (0.50 sec)

mysql> check table user;
+-------------------------+-------+----------+----------+
| Table        | Op    | Msg_type | Msg_text |
+-------------------------+-------+----------+----------+
| user | check | status  | OK      |
+-------------------------+-------+----------+----------+
1 row in set (0.04 sec)

mysql>


 


mysql restart