mysql日志:
[ERROR][MY-011906][InnoDB]Database page corruption on disk or a failed file read of page [page id: space=4621, page number=1515]. You may have to recover from a backup.
[ERROR] [MY-011937] [InnoDB] [FATAL] Apparent corruption of an index page [page id: space=4621, page number=1917] to be written to data file. We intentionally crash the server to prevent corrupt data from ending up in data files
应该是数据库断电的时候,有个事物没做完就断电了,正常情况下再次启动数据库的时候,会进行事务恢复,但是,好巧不巧有个表的 page 坏了,重做事务的时候做不了,好像是重做事务的时候提示表有错误导致事务无法重做。
官方的意思:大概是没救了!
解决方案 |
打开配置文件:my.ini
添加配置:
innodb_force_recovery=6
net start mysql
再次启动mysql,现在启动的mysql是只读,然后把表的数据与结构导出,接下来修改配置innodb_force_recovery=0,最后重新安装一次mysql8.0导入数据即可