前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Mysql启动失败 InnoDB Error: "log sequence number is in the future"

Mysql启动失败 InnoDB Error: "log sequence number is in the future"

作者头像
扫地工程师
修改2020-05-11 10:47:23
5.9K0
修改2020-05-11 10:47:23
举报
文章被收录于专栏:微星极光微星极光

如何修复 Mysql启动失败 InnoDB Error: "log sequence number is in the future"

问题背景

自动昨天暴力重启了macbook, 继上个问题 之后,

有出现了新问题, 报错如下

代码语言:txt
复制
2020-05-10T09:34:15.839994Z 0 [ERROR] InnoDB: Page [page id: space=0, page number=205] log sequence number 4419634190 is in the future! Current system log sequence number 4414499637.
...
2020-05-10T09:34:16.044784Z 0 [ERROR] Failed to create file(file: './auto.cnf', errno 13)
2020-05-10T09:34:16.044787Z 0 [ERROR] Initialization of the server's UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID.

解决方案

从日志看起来, 这个应该是数据断点不一致, 导致启动时候序号校验失败

有两个解决办法

1. 手动调整log sequence number

用gdb启动进程, 设置断点, 跟踪 log_sys 数据结构,

把这个值改成报错信息对应的数字即可

代码语言:txt
复制
gdb -p pgrep -x mysqld
gdb) p log_sys->lsn
$1 = 4419634190
(gdb) set log_sys->lsn = 4414499637
(gdb) c

2. 如果数据不重要的话, 把日志文件删了重启进程也行

原文链接

参考链接

1 https://www.percona.com/blog/2013/09/11/how-to-move-the-innodb-log-sequence-number-lsn-forward/

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 如何修复 Mysql启动失败 InnoDB Error: "log sequence number is in the future"
    • 问题背景
      • 解决方案
        • 1. 手动调整log sequence number
          • 2. 如果数据不重要的话, 把日志文件删了重启进程也行
            • 原文链接
              • 参考链接
              相关产品与服务
              云数据库 SQL Server
              腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
              领券
              问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档