Mysql Got error 127 when reading table

Mysql 数据库errlog中有错误日志,提示:Got error 127 when reading table xxx!Mysql 版本:『mysql Ver 14.14 Distrib 5.6.35, for Linux (x86_64) using EditLine wrapper』,下面是具体的解决办法:

错误日志:
2017-02-03 14:48:39 27759 [ERROR] Got error 127 when reading table ‘./sudops_com/sudops_options’
2017-02-03 14:48:41 27759 [ERROR] Got error 127 when reading table ‘./sudops_com/sudops_options’
2017-02-03 14:49:33 27759 [ERROR] Got error 127 when reading table ‘./sudops_com/sudops_options’

修复办法:

mysql> use sudops_com      
mysql> check table sudops_options;
+--------------------------------+-------+----------+----------------------------------------------------------+
| Table                          | Op    | Msg_type | Msg_text                                                 |
+--------------------------------+-------+----------+----------------------------------------------------------+
| sudops_com.sudops_options      | check | warning  | Table is marked as crashed                               |
| sudops_com.sudops_options      | check | warning  | 2 clients are using or haven't closed the table properly |
| sudops_com.sudops_options      | check | warning  | Size of datafile is: 2488268       Should be: 2488132    |
| sudops_com.sudops_options      | check | error    | Wrong record length 1374362 of 1374495 at 9956           |
| sudops_com.sudops_options      | check | error    | Corrupt                                                  |
+--------------------------------+-------+----------+----------------------------------------------------------+
5 rows in set (0.32 sec)


mysql> repair table sudops_options;
+--------------------------------+--------+----------+------------------------------------------------------+
| Table                          | Op     | Msg_type | Msg_text                                             |
+--------------------------------+--------+----------+------------------------------------------------------+
| sudops_com.sudops_options      | repair | info     | Wrong block with wrong total length starting at 9956 |
| sudops_com.sudops_options      | repair | warning  | Number of rows changed from 351 to 350               |
| sudops_com.sudops_options      | repair | status   | OK                                                   |
+--------------------------------+--------+----------+------------------------------------------------------+
3 rows in set (0.19 sec)

repair之后再次check下表状态:

mysql> check table sudops_options;
+--------------------------------+-------+----------+----------+
| Table                          | Op    | Msg_type | Msg_text |
+--------------------------------+-------+----------+----------+
| sudops_com.sudops_options      | check | status   | OK       |
+--------------------------------+-------+----------+----------+
1 row in set (0.03 sec)

可以看到已经OK了 :)

再次看下mysql的 errlog:
2017-02-03 14:51:05 27759 [ERROR] /usr/sbin/mysqld: Table ‘./sudops_com/sudops_options’ is marked as crashed and should be repaired
2017-02-03 14:51:05 27759 [ERROR] /usr/sbin/mysqld: Table ‘./sudops_com/sudops_options’ is marked as crashed and should be repaired
2017-02-03 14:51:05 27759 [ERROR] /usr/sbin/mysqld: Table ‘./sudops_com/sudops_options’ is marked as crashed and should be repaired
2017-02-03 14:51:15 27759 [Note] Found 350 of 351 rows when repairing ‘./sudops_com/sudops_options

mysql表已经修复成功!

u2

Related Posts

mysql连接失败:The driver has not received any packets from the server

解决java spring连接mysql报错问题,增加连接串参数

python cx-Oracle 驱动安装

安装oracle驱动 cx-Oracle驱动二进制版本下载地…

You Missed

从”养虾”到AI Agent爆发:2026年技术圈的新范式转移

  • u2
  • 3月 9, 2026
  • 11 views

提示词注入:AI时代最危险的漏洞,正在吞噬你的数据

  • u2
  • 3月 7, 2026
  • 44 views
提示词注入:AI时代最危险的漏洞,正在吞噬你的数据

潘多拉魔盒已打开:开源AI攻击平台正在血洗全球防火墙

  • u2
  • 3月 4, 2026
  • 69 views
潘多拉魔盒已打开:开源AI攻击平台正在血洗全球防火墙

雇佣AI员工,花钱上班:开发者的新”职场”荒诞剧

  • u2
  • 3月 1, 2026
  • 66 views
雇佣AI员工,花钱上班:开发者的新”职场”荒诞剧

OpenClaw 完整使用指南:自托管 AI Agent 的架构与实战

  • u2
  • 2月 25, 2026
  • 192 views
OpenClaw 完整使用指南:自托管 AI Agent 的架构与实战

Anthropic 推出 Claude Code Security:AI 驱动的代码安全神器

  • u2
  • 2月 24, 2026
  • 107 views