mariadb:InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes

时间:2021-08-05 11:05:32

mariadb 启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0

起因:线上正在运行的系统,因为需要调整性能,变更了my.cnf参数的innodb_log_file_size大小,重启MySQL时err日志输出如下
InnoDB: Error: log file ./ib_logfile0 is of different size 0 xxxx bytes

停掉mariadb 
解决办法:移除原有ib_logfile
#mv ib_logfile0 ib_logfile0.bak
#mv ib_logfile1 ib_logfile1.bak

rm -rf ib_logfile*