Corrupt mysql system tables

Posted by psynnott on Server Fault See other posts from Server Fault or by psynnott
Published on 2012-12-12T10:31:40Z Indexed on 2012/12/12 11:07 UTC
Read the original article Hit count: 345

Filed under:
|
|

I am having issues with the columns_priv table in the mysql system database. I cannot add new users currently.

I have tried repairing it using mysqlcheck --auto-repair --all-databases --password but I get the following output:

mysql.columns_priv
Error    : Incorrect file format 'columns_priv'
error    : Corrupt

Is there any other way to repair this table, or how do I go about replacing it with a blank table? What would I lose by doing that?

Thank you

Edit (Additional Info) mysqld is currently using 100% cpu constantly.

Looking at show processlist, I get:

mysql> show processlist;
+-----+------------------+-----------+-------+---------+------+-------------------+------------------------------------------------------------------------------------------------------+
| Id  | User             | Host      | db    | Command | Time | State             | Info                                                                                                 |
+-----+------------------+-----------+-------+---------+------+-------------------+------------------------------------------------------------------------------------------------------+
|   5 | debian-sys-maint | localhost | mysql | Query   | 1589 | Opening tables    | ALTER TABLE tables_priv
   MODIFY Column_priv set('Select','Insert','Update','References')
     COLL |                                                                        |
| 752 | root             | localhost | NULL  | Query   |    0 | NULL              | show processlist                                                                                     |
+-----+------------------+-----------+-------+---------+------+-------------------+------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

© Server Fault or respective owner

Related posts about mysql

Related posts about database