컴터/mysql

ERROR 1016: Can't open file: 'brd_picture.MYI'. (errno: 145)

우렁씨 2008. 5. 21. 10:34

ERROR 1016: Can't open file: 'zetyx_board_vegas_qna'. (errno: 145)

->테이블이 깨진듯..


해결...

1..

mysqlcheck -u아이디 -p비번 --auto-repair -B 복원할 DB명

2..

mysql> check table zetyx_board_vegas_qna; ->에러내용
+-----------------------------+-------+----------+-------------------------------------------------------+
| Table                       | Op    | Msg_type | Msg_text                                              |
+-----------------------------+-------+----------+-------------------------------------------------------+
| chin9.zetyx_board_vegas_qna | check | warning  | Table is marked as crashed                            |
| chin9.zetyx_board_vegas_qna | check | warning  | 1 client is using or hasn't closed the table properly |
| chin9.zetyx_board_vegas_qna | check | warning  | Size of datafile is: 6189056       Should be: 6188872 |
| chin9.zetyx_board_vegas_qna | check | error    | Record at pos: 6188852 is not remove-marked           |
| chin9.zetyx_board_vegas_qna | check | error    | record delete-link-chain corrupted                    |
| chin9.zetyx_board_vegas_qna | check | error    | Corrupt                                               |
+-----------------------------+-------+----------+-------------------------------------------------------+
6 rows in set (0.04 sec)

mysql> repair table zetyx_board_vegas_qna; -> 고침
+-----------------------------+--------+----------+------------------------------------------------------+
| Table                       | Op     | Msg_type | Msg_text                                             |
+-----------------------------+--------+----------+------------------------------------------------------+
| chin9.zetyx_board_vegas_qna | repair | info     | Found block that points outside data file at 6188852 |
| chin9.zetyx_board_vegas_qna | repair | status   | OK                                                   |
+-----------------------------+--------+----------+------------------------------------------------------+
2 rows in set (6.47 sec)

mysql> check table zetyx_board_vegas_qna; -> 결과
+-----------------------------+-------+----------+----------+
| Table                       | Op    | Msg_type | Msg_text |
+-----------------------------+-------+----------+----------+
| chin9.zetyx_board_vegas_qna | check | status   | OK       |
+-----------------------------+-------+----------+----------+
1 row in set (0.44 sec)