当前位置:首页 > 数据库 > 正文内容

电脑断电导致mysql不可用,删除ib_logfile0和ib_logfile1恢复

root5年前 (2021-05-19)数据库1870

mysql安装在虚拟机中,公司突然断电导致mysql启动失败
查看mysql的error日志

2021-05-19T06:44:51.993300Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 2798595433 and the end 2798595072.

2021-05-19T06:44:51.993316Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error

2021-05-19T06:44:52.598369Z 0 [ERROR] Plugin 'InnoDB' init function returned error.

2021-05-19T06:44:52.598399Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

2021-05-19T06:44:52.598405Z 0 [ERROR] Failed to initialize builtin plugins


主要的原因是mysql会在最新的checkpoint完成后都会在redo log写一个一字节的MLOG_CHECKPOINT 标记,用来标记在此之前的redo都已checkpoint完成。如果处于任何原因没有找到这个标记,那么整个redo日志文件都会被忽略。出现这个错误的话,最好是有备份进行恢复,如果没有做好备份,那只能采取非常规的启动方式,但可能造成数据丢失

删除/var/lib/mysql目录下的ib_logfile0和ib_logfile1重新启动就可以了

https://blog.csdn.net/eagle89/article/details/102704021

https://blog.csdn.net/weixin_43424368/article/details/108892963


扫描二维码推送至手机访问。

版权声明:本文由一叶知秋发布,如需转载请注明出处。

本文链接:https://zhiqiu.top/?id=105

分享给朋友:

相关文章

mysql启动失败 日志InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 3485

mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT betweenmysql版本:5.7.33系统版本:ubuntu16.04由于电脑突然关闭,跑在VMware里面的mys...

postgresql 的安装使用

安装centos系统 9.6版本# Install the repository RPMsudo yum install -y https://download.postgresql.org/pub/repos/yum/repor...

postgresql修改数据存储位置

postgresql修改数据存储位置

最近公司提供了一台新的服务器,同时有一个盘是ssd。同时为了测试postgresql的性能,将数据放置到ssd上系统centos7.9 数据库postgresql-9.6首先停掉数据库systemctl stop pos...

被Navicat坑哭的日常,版本问题

mysql5.7DROP TABLE IF EXISTS `xxx_copy1`;CREATE TABLE `xxx_copy1`  (  `id` int(11) UNSIGNED NOT NULL AUTO_INCR...

清空postgresql的缓存

系统:centos,版本:postgresql-9.6因为要测试postgresql的性能,当多次查询的时候查询结果会因为缓存用时很短,不能模拟出现实使用的场景。因此需要清除缓存。首先stop掉postgresqlsystemctl sto...

postgresql 查看数据库、表的大小

查看数据库的大小 select pg_database_size('test'); select pg_size_pretty(pg_database_size('test');查看单...