One of my mysql tables is acting up. The other tables in the rest of the database work fine. I don't know what's wrong. I recently had some trouble with the server and had it restarted, but ever since this has been the issue.
mysql> Describe MenuItems;
ERROR 1016: Can't open file: 'MenuItems.MYI'. (errno: 145)
mysql> show tables;
+---------------------+
| Tables_in_sps_irc |
+---------------------+
| Contacts |
| MenuItems |
| QuickLinkCategories |
| QuickLinks |
| Settings |
| Subscriptions |
| Users |
+---------------------+
7 rows in set (0.00 sec)
So I tried to repair it, at a friend's suggestion
mysql> repair table MenuItems;
+-------------------+--------+----------+----------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------+--------+----------+----------------------------------------------------+
| sps_irc.MenuItems | repair | info | Found block that points outside data file at 50804 |
| sps_irc.MenuItems | repair | error | 28 when fixing table |
| sps_irc.MenuItems | repair | status | Operation failed |
+-------------------+--------+----------+----------------------------------------------------+
3 rows in set (0.08 sec)
mysql> check table MenuItems;
+-------------------+-------+----------+--------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------+-------+----------+--------------------------------------------------------+
| sps_irc.MenuItems | check | warning | Table is marked as crashed and last repair failed |
| sps_irc.MenuItems | check | warning | 1 clients is using or hasn't closed the table properly |
| sps_irc.MenuItems | check | error | Size of datafile is: 208896 Should be: 211120 |
| sps_irc.MenuItems | check | error | Corrupt |
+-------------------+-------+----------+--------------------------------------------------------+
4 rows in set (0.00 sec)
mysql> show table status;
+---------------------+--------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+----------------+------------------------------------------------+
| Name | Type | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Create_options | Comment |
+---------------------+--------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+----------------+------------------------------------------------+
| Contacts | MyISAM | Dynamic | 11 | 132 | 1452 | 4294967295 | 2048 | 0 | 15 | 2004-11-15 14:16:05 | 2005-06-17 14:55:21 | NULL | | |
| MenuItems | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Can't open file: 'MenuItems.MYI'. (errno: 144) |
| QuickLinkCategories | MyISAM | Dynamic | 3 | 36 | 140 | 4294967295 | 2048 | 32 | 14 | 2004-11-15 15:24:18 | 2005-08-01 06:41:43 | NULL | | |
| QuickLinks | MyISAM | Dynamic | 13 | 103 | 1348 | 4294967295 | 2048 | 0 | 44 | 2004-11-15 15:23:04 | 2005-08-01 06:43:53 | NULL | | |
| Settings | MyISAM | Dynamic | 4 | 47 | 188 | 4294967295 | 1024 | 0 | NULL | 2004-11-05 12:01:01 | 2005-07-18 08:48:37 | NULL | | |
| Subscriptions | MyISAM | Dynamic | 10 | 28 | 308 | 4294967295 | 2048 | 20 | 18 | 2005-06-01 13:38:46 | 2005-07-26 08:08:45 | NULL | | |
| Users | MyISAM | Dynamic | 18 | 70 | 1264 | 4294967295 | 2048 | 0 | 21 | 2004-12-10 15:07:19 | 2005-07-25 12:38:32 | NULL | | |
+---------------------+--------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+----------------+------------------------------------------------+
7 rows in set (0.00 sec)
But still no luck, obviously. I have NO idea what to do from here. I have no backups of the data. Even if I could find the data, intact somewhere, it would be useful. There's a lot of important stuff in there that took a really long time to compile. Is there any way to repair or replace the index? Thanks!!