关于[InnoDB] Unsupported redo log format (0). The redo log was created before MySQL 5.7.9的解决办法

google上查到的

关闭slow shutdown,我在centos7 上输入代码

slow shutdown

发现没作用,也无效
然后,使用cd 进入 /var/lib/mysql/文件夹,

cd /var/lib/mysql

其实不用进入,我直接查找的ib_logfile0 和ib_logfile1

find / -name ib_logfile0
find / -name ib_logfile1

利用mkdir和cp命令进行备份,

mkdir backup
cp /var/lib/mysql/ib_logfile0 /backup
cp /var/lib/mysql/ib_logfile1 /backup

然后删除备份前的这两个文件,

rm /var/lib/mysql/ib_logfile0
rm /var/lib/mysql/ib_logfile0

重新运行

service mysqld start
service mysqld status -l

成功运行

之后备份了my.cnf配置,并删除

rm /etc/my.cnf

删除 /var/lib/mysql解决

[ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.

的提示
rm -rf /var/lib/mysql
重新运行

service mysqld start
service mysqld status -l

无警告和报错

google原文

If you have already installed MySQL and did not perform a slow shutdown using the

innodb_fast_shutdown

Flag, simply go to your MySQL directory

/var/lib/mysql/

And remove the log files (Do not do this if you need the table data in your database until you have backed up your database):

ib_logfile0 ib_logfile1

Back them up before if you need them again.

参考链接:
1
2

猜你喜欢

转载自blog.csdn.net/ptmicky/article/details/89328208