MySQL挂了,服务起不来,怎么恢复?

王桑的一天 2018-09-12 08:06:40
Windows 7 系统,mysqld 服务起动失败。
应该是断电引起的,出现过好几次了。
以前是my.ini里设置 innodb_force_recovery = 6,以恢复模式启动是可以的,因为是只读模式,只能导出数据库备份。

再撤销上面的设置,删除ib_logfile0和ib_logfile1,启动mysqld,drop掉数据库,重新导入备份。就能恢复。

结果现在导出数据库做备份时,出现错误,导出失败。

这种情况要怎么恢复?

下面是启动失败的日志,网上查了,是日志序列什么的对不上?

2018-09-12T08:48:06.250781Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-09-12T08:48:06.250781Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-09-12T08:48:06.250781Z 0 [Note] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe (mysqld 5.7.9-log) starting as process 122412 ...
2018-09-12T08:48:06.266381Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2018-09-12T08:48:06.266381Z 0 [Note] InnoDB: Uses event mutexes
2018-09-12T08:48:06.266381Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2018-09-12T08:48:06.266381Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-09-12T08:48:06.266381Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2018-09-12T08:48:06.266381Z 0 [Note] InnoDB: Number of pools: 1
2018-09-12T08:48:06.266381Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2018-09-12T08:48:06.297581Z 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M
2018-09-12T08:48:06.297581Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-09-12T08:48:06.313181Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-09-12T08:48:06.313181Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 16232910614
2018-09-12T08:48:06.313181Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 16232919011
2018-09-12T08:48:06.313181Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 16232910614 and the end 16232919011.
2018-09-12T08:48:06.328781Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-09-12T08:48:06.547181Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-09-12T08:48:06.547181Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-09-12T08:48:06.547181Z 0 [ERROR] Failed to initialize plugins.
2018-09-12T08:48:06.547181Z 0 [ERROR] Aborting

2018-09-12T08:48:06.547181Z 0 [Note] Binlog end
2018-09-12T08:48:06.547181Z 0 [Note] Shutting down plugin 'CSV'
2018-09-12T08:48:06.547181Z 0 [Note] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe: Shutdown complete

...全文
946 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
糖三豆 2018-10-08
  • 打赏
  • 举报
回复
好像我也遇到过
Rotel-刘志东 2018-09-25
  • 打赏
  • 举报
回复
有没有备份呀!如果没有备份,有从库也是可以的。如果两者都没有那就没有什么好办法了。
王桑的一天 2018-09-21
  • 打赏
  • 举报
回复
引用 4 楼 baijiu1 的回复:
刚才看到了一例和你一样的情况:
https://dba.stackexchange.com/questions/163445/innodb-ignoring-the-redo-log-due-to-missing-mlog-checkpoint

恢复了,像以前一样,进入恢复模式等级6, 把表数据表 结构导出,删除数据文件,在空的数据库里导入

只是一次比一次费劲
叶落千尘 2018-09-19
  • 打赏
  • 举报
回复
刚才看到了一例和你一样的情况: https://dba.stackexchange.com/questions/163445/innodb-ignoring-the-redo-log-due-to-missing-mlog-checkpoint
叶落千尘 2018-09-19
  • 打赏
  • 举报
回复
redo log丢失了检查点MLOG之后的数据。
这种情况还没遇到过,静等大神。
王桑的一天 2018-09-14
  • 打赏
  • 举报
回复
没办法恢复吗?不可能吧
rucypli 2018-09-13
  • 打赏
  • 举报
回复
没有从库 没有备份就呵呵了

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧