Navigation
Navigation
MySQL Database
A MySQL MYI table has errors in it.
Applies to: Grid System
If you see these type of error messages from MySQL:
Database failed to execute query (query) 1016: Can't open file: 'sometable.MYI'. (errno: 145)
Error Msg: 1034: Incorrect key file for table: 'sometable'. Try to repair it
thenb you probably have a crashed or corrupt table.
You can check and repair the table from a mysql prompt like this:
check table sometable;
+------------------+-------+----------+----------------------------+
| Table | Op | Msg_type | Msg_text |
+------------------+-------+----------+----------------------------+
| yourdb.sometable | check | warning | Table is marked as crashed |
| yourdb.sometable | check | status | OK |
+------------------+-------+----------+----------------------------+
repair table sometable;
+------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+------------------+--------+----------+----------+
| yourdb.sometable | repair | status | OK |
+------------------+--------+----------+----------+
and now your table should be fine:
check table sometable;
+------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+------------------+-------+----------+----------+
| yourdb.sometable | check | status | OK |
+------------------+-------+----------+----------+
Author: FAQ Admin
Revision: 1.2
You can comment this FAQ