mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT between

mysql版本:5.7.19

系统版本:centos7.3

由于周未公司断电,跑在vmware虚拟机上的mysql挂掉,无法重启

启动mysql的时候,error log的信息如下

  1. --15T11::46.562061+: [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint and the end .
  2. --15T11::46.562090+: [ERROR] InnoDB: Plugin initialization aborted with error Generic error
  3. --15T11::47.062885+: [ERROR] Plugin 'InnoDB' init function returned error.
  4. --15T11::47.062936+: [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  5. --15T11::47.062945+: [ERROR] Failed to initialize plugins.
  6. --15T11::47.062951+: [ERROR] Aborting
  7.  
  8. --15T11::47.062962+: [Note] Binlog end

在redo log里找不到checkpoint点,innodb引擎启动失败

解决办法有两个

第一个

设置innodb_force_recovery=6,然后启动mysql,能够顺利启动mysql

error log信息如下

  1. --15T12::25.235397+: [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
  2. --15T12::25.235408+: [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
  3. --15T12::25.235540+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_leap_second` in the cache. Attempting to load the tablespace with space id
  4. --15T12::25.256456+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_name` in the cache. Attempting to load the tablespace with space id
  5. --15T12::25.258414+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone` in the cache. Attempting to load the tablespace with space id
  6. --15T12::25.263576+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_transition_type` in the cache. Attempting to load the tablespace with space id
  7. --15T12::25.267569+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_transition` in the cache. Attempting to load the tablespace with space id
  8. --15T12::25.272648+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`servers` in the cache. Attempting to load the tablespace with space id
  9. --15T12::25.276466+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`slave_master_info` in the cache. Attempting to load the tablespace with space id
  10. --15T12::25.280225+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`slave_relay_log_info` in the cache. Attempting to load the tablespace with space id
  11. --15T12::25.286619+: [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`slave_worker_info` in the cache. Attempting to load the tablespace with space id
  12. --15T12::25.292450+: [ERROR] Error writing master configuration.
  13. --15T12::25.292468+: [ERROR] Error reading master configuration.
  14. --15T12::25.294535+: [Warning] Recovery from master pos and file mysql-bin. for channel ''. Previous relay log pos and relay log file had been set to , /data/mysql/mysql3306/logs/mysql-relay. respectively.
  15. --15T12::25.294643+: [ERROR] Error writing relay log configuration.
  16. --15T12::25.294656+: [ERROR] Error reading relay log configuration.
  17. --15T12::25.294983+: [ERROR] Slave: Failed to initialize the master info structure for channel ''; its record may still be present in 'mysql.slave_master_info' table, consider deleting it.
  18. --15T12::25.294996+: [ERROR] Failed to create or recover replication info repositories.
  19. --15T12::25.295000+: [Note] Some of the channels are not created/initialized properly. Check for additional messages above. You will not be able to start replication on those channels until the issue is resolved and the server restarted.

由于损坏的这个库是从库,所以显示无法初始化master info表

由于mysql库里有几个表都显示找不到表空间,那么会存在丢失数据的风险

第二个

按照网上说的,把实例的所有ib_logfilex文件删除,再启动mysql,能够顺利启动

参照:http://blog.csdn.net/weiwangsisoftstone/article/details/52954228

error log信息如下

  1. --15T11::17.694175+: [Note] Server socket created on IP: '::'.
  2. --15T11::17.696000+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  3. --15T11::17.696018+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  4. --15T11::17.696287+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  5. --15T11::17.696300+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  6. --15T11::17.696535+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  7. --15T11::17.696551+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  8. --15T11::17.697469+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  9. --15T11::17.697485+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  10. --15T11::17.697809+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  11. --15T11::17.697821+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  12. --15T11::17.698049+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  13. --15T11::17.698061+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  14. --15T11::17.700092+: [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
  15. --15T11::17.700140+: [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
  16. --15T11::17.700153+: [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
  17. --15T11::17.701714+: [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
  18. --15T11::17.701727+: [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
  19. --15T11::17.701881+: [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
  20. --15T11::17.702485+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  21. --15T11::17.702502+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  22. --15T11::17.702718+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  23. --15T11::17.702741+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
  24. --15T11::17.702962+: [ERROR] InnoDB: Page [page id: space=, page number=] log sequence number is in the future! Current system log sequence number .
  25. --15T11::17.702974+: [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.

按照报错信息,数据库也是无法回滚到之前一致性状态,有丢数据风险


总结

一般来说,mysql有坏块或者服务器异常关机

解决方法
1、在my.cnf里设置innodb_force_recovery=1 ,如果1不行改成2,最大是6 ,然后启动mysql, 将数据dump出来再 导入到新的实例
2、根据主键id ,逐个区间去导出,用mysqldump -w where条件,再导入到新实例

innodb_force_recovery影响整个innodb存储引擎的恢复状况,该值默认为0,表示当需要恢复时,需要执行所有的恢复操作,当不能进行有效恢复时,如数据页发生了corruption,mysql数据库可能宕机,并把错误写入错误日志中。

innodb_force_recovery=6表示mysql数据库已经有比较严重的损坏,就算把数据dump出来也不能保证dump出来的数据是没有问题的

最后建议选择第一个解决办法修改innodb_force_recovery的方法来恢复mysql,而不要选择第二个办法

mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT between的更多相关文章

  1. springboot报错Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

    springboot项目在启动时需要把servlet容器编译进去,这时候如果你的maven依赖里面没有配置jetty或者tomcat相关依赖就会报错. 解决方法: jetty添加 <depend ...

  2. Spring boot 报错 Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    在实际开发中修改别人的代码,发现了这个报错,后来发现是因为pom.xml里面 只要将注释掉的部分注释掉就好了.

  3. MySQL启动报错Failed to open log (file 'D:\phpStudy\PHPTutorial\MySQL\data\mysql_bin.000045', errno 2)

    MySQL报错 191105 9:39:07 [Note] Plugin 'FEDERATED' is disabled. 191105 9:39:07 InnoDB: The InnoDB memo ...

  4. 安装mysql报错

    原文链接:https://blog.csdn.net/bao19901210/article/details/51917641 二进制安装 1.添加mysql组和mysql用户,用于设置mysql安装 ...

  5. xtrabackup备份MySQL报错:InnoDB: Error number 24 means 'Too many open files'

    xtrabackup备份MySQL报错:InnoDB: Error number 24 means 'Too many open files' 1.使用xtrabackup备份MySQL时出现如下报错 ...

  6. mysql报错Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage

    mysql报错Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage 在执行cr ...

  7. mysql报错排查总结

    mysql报错: [root@zabbix ~]# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through sock ...

  8. PHP连接MySQL报错:SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' (2)

    如下所示,PHP连接MySQL报错: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' ...

  9. Asp.Net连接Mysql报错Out of sync with server

    Asp.Net连接Mysql报错Out of sync with server 原因:程序引用的MySql.Data.dll版本高于服务器版本 解决:下载一个低版本的MySql.Data.dll,项目 ...

随机推荐

  1. Atitit 分布式管理 vs 集中式管理

    Atitit 分布式管理 vs 集中式管理 1. 集中式管理缺点 1 1.1. 单点故障 1 1.2. 没有灵活性 1 1.3. 打败vs 征服 参考 尼可罗·马基雅弗利编著的<君主论> ...

  2. Clash Royale开发日志

    2018-04-17 本次更新: [修复点击时间bug] [修复断线重连后不自动开始脚本bug] 2018-04-16 本次更新增加以下功能: [支持断线重连机制(5分钟)] [界面UI设置] 201 ...

  3. 【Linux】解决"no member named 'max_align_t'

    编译遇到错误: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1/cstddef:51:11: erro ...

  4. 【iCore4 双核心板_uC/OS-II】例程十一:内存管理

    一.实验说明: 应用程序在运行中为了某种特殊需要,经常需要临时获得一些内存空间.而作为比较完善的操作系统uC/OS-II,也具有动态分配内存的能力. uC/OS-II对内存进行两级管理:把连续内存分成 ...

  5. OraclePLSQL编程

    PL/SQL编程 pl/sql(procedural language/sql)是Oracle在标准的sql语言上的扩展.pl/sql不仅允许嵌入式sql语言,还可以定义变量和常量,允许使用条件语句和 ...

  6. 一文弄懂神经网络中的反向传播法(Backpropagation algorithm)

    最近在看深度学习的东西,一开始看的吴恩达的UFLDL教程,有中文版就直接看了,后来发现有些地方总是不是很明确,又去看英文版,然后又找了些资料看,才发现,中文版的译者在翻译的时候会对省略的公式推导过程进 ...

  7. pointcut 切面表达式 切入点表达式

    下面给出一些常见切入点表达式的例子. 任意公共方法的执行: execution(public * *(..)) 任何一个以“set”开始的方法的执行: execution(* set*(..)) Ac ...

  8. EnumUtil 链表转换工具类

    package com.das.common.util; import org.springframework.util.CollectionUtils; import java.lang.refle ...

  9. CentOS 7下安装samba

    Samba是一种软件,它可以运行在非Windows平台上,比如UNIX, Linux, IBM System 390, OpenVMS或其他操作系统.Samba使用安装在主机上的TCP/IP协议.当正 ...

  10. StringUtils 工具类的常用方法(转载)

    http://guobin6125.iteye.com/blog/1535792