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

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

root4年前 (2021-05-19)数据库1280

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

分享给朋友:

相关文章

postgresql修改数据存储位置

postgresql修改数据存储位置

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

postgresql 查看数据库、表的大小

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

centos7 快速搭建 mysql

https://blog.csdn.net/qq_36582604/article/details/80526287...

mysql 重置表

truncate table 表名...

mysql数据导入es

将mysql数据取出放到elasticsearch中from datetime import datetime from elasticsearch import Elastic...

clickhouse 分区、分片简单理解

clickhouse 分区、分片简单理解

分区是表的分区,具体的DDL操作关键词是 PARTITION BY,指的是一个表按照某一列数据(比如日期)进行分区,对应到最终的结果就是不同分区的数据会写入不同的文件中。分片复用了数据库的分区,相当于在原有的分区下,作为第二层分区...