mysql表损坏 innodb_恢复MySQL中损坏的Innodb表

01fac6460a22031b8af8da5848698a70.png

假设你在使用MySQL中的InnoDB表,但是硬件出现问题,或者遇到了驱动程序错误,内核错误,电源故障或某些罕见的MySQL错误,而在InnoDB表空间的某些页被损坏。在这种情况下,Innodb通常打印出如下:

InnoDB: Database page corruption on disk or a failed

InnoDB: file read of page 7.

InnoDB: You may have to recover from a backup.

080703 23:46:16 InnoDB: Page dump in ascii and hex (16384 bytes):

… A LOT OF HEX AND BINARY DATA…

080703 23:46:16 InnoDB: Page checksum 587461377, prior-to-4.0.14-form checksum 772331632

InnoDB: stored checksum 2287785129, prior-to-4.0.14-form stored checksum 772331632

InnoDB: Page lsn 24 1487506025, low 4 bytes of lsn at page end 1487506025

InnoDB: Page number (if stored to page already) 7,

InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 6353

InnoDB: Page may be an index page where index id is 0 25556

InnoDB: (index “PRIMARY” of table “test”.”test”)

InnoDB: Database page corruption on disk or a failed

MySQL并且崩溃,日志声称故障。 所以你要如何恢复这样的表呢?

被损坏的可能有各种东西,我将详细查看这篇文章中的简单示例 – 在聚集键中索引页被损坏。这相比于在secondary索引的数据损坏更糟,该情况下简单的OPTIMIZE TABLE足以重建它,但它相对于表字典损坏又较好,因为该情况下表的恢复会更难。

在这个例子中,我其实手动编辑了t

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值