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

数据库评论830字数 202阅读模式

对于使用了默认 my.cnf(一般教程都会教你使用support-files/my-medium.cnf)的Mysql服务来说如果中间使用了innodb的话,innodb默认的log file大小是56M

如果你的配置文件使用了类似my-innodb-heavy-4G.cnf作为配置文件的话。很文博客-https://www.zhenjiekeji.com/17867.html

Mysql可以正常启动,但innodb的表无法使用很文博客-https://www.zhenjiekeji.com/17867.html

在错误日志里你会看到如下输出:很文博客-https://www.zhenjiekeji.com/17867.html

InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes很文博客-https://www.zhenjiekeji.com/17867.html

现在需要做的事情就是把原来的 innodb 的ib_logfile×备份到一个目录下,然后删除掉原来的文件,重启 mysql。很文博客-https://www.zhenjiekeji.com/17867.html

你会看到ib_logfile*大小变成了你配置文件中指定的大小。很文博客-https://www.zhenjiekeji.com/17867.html

my-innodb-heavy-4G.cnf的话(log file 的大小是256M:innodb_log_file_size = 256M)很文博客-https://www.zhenjiekeji.com/17867.html

你会看到很多个268435456大小的文件。

weinxin
我的微信
微信号已复制
扫一扫更精彩
大家的支持是我更新的动力!!!
匿名

发表评论

匿名网友