一台mysql服务器,机器意外重启后,n个表报错,想必你已经知道库的引擎是myisam的了,太悲催,太蛋碎了,先看看报错信息:mysqldescpartition_keys;error130(hy0
一台mysql 服务器,机器意外重启后,n个表报错,想必你已经知道库的引擎是myisam 的了,,太悲催,太蛋碎了,先看看报错信息:
mysql> desc partition_keys;error 130 (hy000): incorrect file format 'partition_keys'mysql> check table partition_keys;+-------------------------+-------+----------+----------------------------------------+| table | op | msg_type | msg_text |+-------------------------+-------+----------+----------------------------------------+| hivedbwm.partition_keys | check | error | incorrect file format 'partition_keys' || hivedbwm.partition_keys | check | error | corrupt |+-------------------------+-------+----------+----------------------------------------+2 rows in set (0.00 sec)执行repair table table_name use_frm; 修复:
mysql> repair table partition_keys use_frm;+-------------------------+--------+----------+----------+| table | op | msg_type | msg_text |+-------------------------+--------+----------+----------+| hivedbwm.partition_keys | repair | status | ok |+-------------------------+--------+----------+----------+1 row in set (0.02 sec)mysql> desc partition_keys; +--------------+---------------+------+-----+---------+-------+| 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)
本文出自 “屌丝运维男” 博客,请务必保留此出处