• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

MySQL 访问某数据 crash

mysql 搞代码 4年前 (2022-01-09) 10次浏览 已收录 0个评论

症状: mysqldump 导出数据 或者访问某张表的或者某条数据的时候 mysql 直接 挂 了. 日志如下: InnoDB: Database page corruption

症状: mysqldump 导出数据 或者访问某张表的或者某条数据的时候 mysql 直接 挂 了.
日志如下:
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 26400.
InnoDB: You may have to recover from a backup.
120217 15:45:53 InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex a922822af0c7bcef6d93dadcf4f63e8331d51e7a490667defbefxxxx………………
InnoDB: End of page dump

f 6 PE a r zx3120217 15:45:53 InnoDB: Page checksum 3458627726, prior-to-4.0.14-form checksum 796906866
InnoDB: stored checksum 2837611050, prior-to-4.0.14-form stored checksum 2410301789
InnoDB: Page lsn 836050554 1225156574, low 4 bytes of lsn at page end 2266014174
InnoDB: Page number (if stored to page already) 4039621871,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 4222022822
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 26400.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
解决: 具体原因不明 参考文档:本文来源gao@!dai!ma.com搞$$代^@码5网@

首先D:\cn.tsoft.system\mysql5.1.37\bin>mysqlcheck -uroot -pxxxx -P3306 –all-database 定位哪张表出了问题
执行结果如下:
tech_soft_drp_361new.pos_tradebill_cashredeem_item OK
mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when e
xecuting ‘CHECK TABLE … ‘

由tech_soft_drp_361new.pos_tradebill_cashredeem_item 知道下一张表是 pos_tradebill_item

将my.ini 里边的#innodb_force_recovery=1 #号去掉 重启mysql服务

然后将pos_tradebill_item 数据导出到文件(导出的时候注意导出数据的条数是否正确!)(记录select count(*) from pos_tradebill_item 与导出的条数对比)

找到pos_tradebill_item的建表语句.

删除pos_tradebill_item表

重建pos_tradebill_item表.

导入pos_tradebill_item数据(导入数据的时候将innodb_force_recovery=1重新加上#号. innodb_force_recovery=1模式不支持写)


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:MySQL 访问某数据 crash
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址