mysql ib_logfile0 丢失,在移动ib_logfile1和ib_logfile0文件后出现问题

I wanted to increase the innodb_log_file_size for better performance. And i increased it from the default value to 256 MB. As usual i got the error saying InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes. So i moved these files to different location and restarted the mysql server. It worked. Before shuting down the mysql server i also made innodb_fast_shutdown = 0.

But i have a doubt, after mysql shutdown can we expect mysql is an consistent state and all the data that were in the ib_logfile0 and ib_logfile1 have been written to data files. So that i can delete these files or should i do something else also.

And if the answer is mysql will be in consistant state than why these files contain some data even after graceful shutdown and start up with innodb_fast_shutdown = 0.

Thanks in advance!!!!

解决方案

Steps I followed:

SET GLOBAL innodb_fast_shutdown = 0

/etc/init.d/mysqld stop

rm -f /var/lib/mysql/ib_logfile0

rm -f /var/lib/mysql/ib_logfile1

/etc/init.d/mysqld start

these steps are correct and is accepted by RolandoMySQLDBA in this thread.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值