常见 mysql innodb 表错误

修复 mysql 过程中

mysql> check table itv_back.itv_score1;
+---------------------+-------+----------+----------------------------------------------------------------------------------------------+
| Table               | Op    | Msg_type | Msg_text                                                                                     |
+---------------------+-------+----------+----------------------------------------------------------------------------------------------+
| itv_back.itv_score1 | check | error    | Table rebuild required. Please do "ALTER TABLE `itv_score1` FORCE" or dump/reload to fix it! |
+---------------------+-------+----------+----------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

 

表需要重建

 

利用 show create table

CREATE TABLE `itv_score1` (
  `activity_name` varchar(100) CHARACTER SET gbk DEFAULT NULL COMMENT '▒▒▒▒',
  `user_id` varchar(50) CHARACTER SET gbk DEFAULT NULL,
  `id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=gbk


尝试根据提示修复,返回错误信息

mysql> alter table itv_back.itv_score1 force;
ERROR 1030 (HY000): Got error -1 from storage engine


不支持 innodb 格式

只能够通过备份进行恢复。

你可能感兴趣的:(常见 mysql innodb 表错误)