在移动ib_logfile1和ib_logfile0文件后出现问题 [英] Issue after moving the ib_logfile1 and ib_logfile0 files
问题描述
我想增加 innodb_log_file_size
以获得更好的性能。我把它从默认值增加到256 MB。像往常一样,我得到错误说 InnoDB:错误:日志文件./ib_logfile0是不同的大小0 5242880字节
。所以我把这些文件移动到不同的位置,并重新启动mysql服务器。有效。在关闭mysql服务器之前,我也使 innodb_fast_shutdown = 0
。
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
.
但我有一个疑问,在mysql关闭后,我们可以期望mysql是一致的状态和所有的数据,在 ib_logfile0
和 ib_logfile1
已写入数据文件。所以我可以删除这些文件或应该我做别的事情。
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.
如果答案是mysql将处于一致的状态,而不是为什么这些文件包含一些数据,即使在正常关机后,启动 innodb_fast_shutdown = 0
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
.
提前感谢!
推荐答案
我遵循的步骤:
-
SET GLOBAL innodb_fast_shutdown = 0
-
/etc/init.d/mysqld stop
-
-f / var / lib / mysql / ib_logfile0
-
rm -f / var / lib / mysql / ib_logfile1
-
/etc/init.d/mysqld start
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
这些步骤是正确的, RolandoMySQLDBA 在此线程。
these steps are correct and is accepted by RolandoMySQLDBA in this thread.
这篇关于在移动ib_logfile1和ib_logfile0文件后出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!