InnoDB:由于缺少MLOG_CHECKPOINT而忽略重做日志


10

我正在使用mysql版本5.7.14(在OS X El Capitan上进行自制安装)。当mysql运行时,我的系统无法正常关闭;当我尝试启动mysql守护程序时,重新启动后,出现以下错误。

2017-02-07T10:11:42.224506Z 0 [Note] mysqld (mysqld 5.7.14) starting as process 18234 ...
2017-02-07T10:11:42.227375Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2017-02-07T10:11:42.228809Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-02-07T10:11:42.228821Z 0 [Note] InnoDB: Uses event mutexes
2017-02-07T10:11:42.228826Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-02-07T10:11:42.228830Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-02-07T10:11:42.229114Z 0 [Note] InnoDB: Number of pools: 1
2017-02-07T10:11:42.229227Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-02-07T10:11:42.230512Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-02-07T10:11:42.239632Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-02-07T10:11:42.270103Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-02-07T10:11:42.270567Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 44002250712 and the end 44002250240.
2017-02-07T10:11:42.270606Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-02-07T10:11:42.577436Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-02-07T10:11:42.577470Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-02-07T10:11:42.577484Z 0 [ERROR] Failed to initialize plugins.
2017-02-07T10:11:42.577488Z 0 [ERROR] Aborting

我尝试重新启动mysqld,innodb-force-recovery=1但没有成功。谁能指导我如何从这种状态中恢复过来。


这里有运气吗?我陷入了完全相同的问题。
MMagician

Answers:


16

请尝试以下操作:

  1. innodb_log_checksums = ON在主机和从机上设置。
  2. 删除rm /var/lib/mysql/ib_logfile*
  3. 重新开始。

删除ib_logfile将会丢失数据。
digz6666

@ digz6666你怎么说?
Brian Leishman '18

@BrianLeishman尝试使用演示数据:)
digz6666 '18 -10-4

2
@ digz6666我在发表评论之前就做了,它工作得很好,没有任何损失,DB开始大声笑
Brian Leishman

1
作为参考,我也对此进行了测试(尽管在WAMP上),并恢复了数据库。没有数据丢失。
杰夫·F
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.