mysql 强行关机后,数据库事务不一致,无法启动:
数据库错误日志报错,无法启动:
[Note] InnoDB: Restoring possible half-written data pages
[Note] InnoDB: from the doublewrite buffer...
InnoDB: Warning: database page corruption or a failed
InnoDB: file read of space 140 page 1350.
InnoDB: Trying to recover it from the doublewrite buffer.
解决:
1.修改参数文件
添加参数 :innodb_force_recovery = 6
2.启动数据库
3.逻辑导出数据库
4.备份data下数据文件:
ibdata1 ib_logfile0 ib_logfile1 文件
5.删除文件
ibdata1 ib_logfile0 ib_logfile1 文件
6.启动数据库
7.新建数据库,将数据导入