MySQL启动报错解决 InnoDB is in the future&& Failed to start LSB: Bring up/down networking

1.MySQL掉电宕机修复

前日虚拟机mysql服务起不来
tail -100f /var/log/mysqld.log
发现问题是:InnoDB:XXX is in the future!
原因:突然掉电,导致有些log没有写入系统,所以出现了序列号不一致情况。
InnoDB:XXX is in the future!
解决:
/etc/my.cnf加 innodb_force_recovery = 4进入恢复模式,数值大于等于4,会对数据文件造成永久的破坏,不可恢复(搜索一下就知道原因);
保证可以起服务就可以了,从1-3进行修改尝试。

删除掉出错的数据文件:

cd /var/lib/mysql
rm -rf ib_logfile0 ib_logfile1 ibdata
mysql的innodb中事务日志ib_logfile(0/1)

关闭恢复模式

重启mysqld就好了

2.centos7 Failed to start LSB: Bring up/down networking错误

错误原因:关机问题

systemctl stop NetworkManager
systemctl disable NetworkManager
service network start

即可

猜你喜欢

转载自blog.csdn.net/qq_33997198/article/details/103487075