DB관련/MySQL

[Mysql] 테이블 크래쉬 체크 Table 'user' is marked as crashed and should be rep..

saltdoll 2008. 4. 10. 16:30
반응형

Mysql 테이블 크래쉬가 날때,  check table 명령으로 체크해 봅니다.


mysql> check table n2_fileman_rtree; --빨간색이 테이블명입니다.
+--------------------------+-------+----------+---------------------------------------------------------------------------------------------+
| Table                    | Op    | Msg_type | Msg_text                                                                                    |
+--------------------------+-------+----------+---------------------------------------------------------------------------------------------+
| nblogTW.n2_fileman_rtree | check | error    | Table './nblogTW/n2_fileman_rtree' is marked as crashed and last (automatic?) repair failed |
+--------------------------+-------+----------+---------------------------------------------------------------------------------------------+

mysql> repair table n2_fileman_rtree;
+--------------------------+--------+----------+----------+
| Table                    | Op     | Msg_type | Msg_text |
+--------------------------+--------+----------+----------+
| nblogTW.n2_fileman_rtree | repair | status   | OK       |
+--------------------------+--------+----------+----------+
1 row in set (0.04 sec)

mysql> !check
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!check' at line 1
mysql> check table n2_fileman_rtree;
+--------------------------+-------+----------+----------+
| Table                    | Op    | Msg_type | Msg_text |
+--------------------------+-------+----------+----------+
| nblogTW.n2_fileman_rtree | check | status   | OK       |
+--------------------------+-------+----------+----------+
1 row in set (0.00 sec)

mysql> desc n2_fileman_rtree;
+-------------+----------+------+-----+---------+-------+
| Field       | Type     | Null | Key | Default | Extra |
+-------------+----------+------+-----+---------+-------+
| tree_seq    | int(20)  | NO   | PRI |         |       |
| up_tree_seq | int(20)  | NO   | PRI |         |       |
| m_userno    | int(20)  | NO   | PRI |         |       |
| m_userid    | char(20) | NO   |     |         |       |
+-------------+----------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> exit

반응형
도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)