公司一台服务器,php+mysql搭建的环境放公司网站,今天机房意外重启后,结果打开后台报错,想必你已经知道库的引擎是myisam 的了,太悲催,太蛋碎了,先看看报错信息:
mysql> desc v9_member;
ERROR 130 (HY000): Incorrect file format 'v9_member'
mysql> check table v9_member;
+-------------------------+-------+----------+----------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------------+-------+----------+----------------------------------------+
| hivedbwm.v9_member | check | Error | Incorrect file format 'v9_member' |
| hivedbwm.v9_member | check | error | Corrupt |
+-------------------------+-------+----------+----------------------------------------+
2 rows in set (0.00 sec)
执行REPAIR TABLE table_name USE_FRM; 修复:
mysql> REPAIR TABLE v9_member USE_FRM;
+-------------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-------------------------+--------+----------+----------+
| hivedbwm.v9_member | repair | status | OK |
+-------------------------+--------+----------+----------+
1 row in set (0.02 sec)
mysql> desc v9_member;
+--------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------+------+-----+---------+-------+
| TBL_ID | bigint(20) | NO | PRI | NULL | |
| PKEY_COMMENT | varchar(4000) | YES | | NULL | |
| PKEY_NAME | varchar(128) | NO | PRI | NULL | |
| PKEY_TYPE | varchar(767) | NO | | NULL | |
| INTEGER_IDX | int(11) | NO | | NULL | |
+--------------+---------------+------+-----+---------+-------+
5 rows in set (0.02 sec)