mysql 有關(guān)“InnoDB Error ib_logfile0 of different size”錯誤
更新時間:2011年06月18日 23:32:33 作者:
mysql 有關(guān)“InnoDB Error ib_logfile0 of different size”錯誤的解決方法,需要的朋友可以參考下。
1,查看Mysqld(/var/log/mysqld.log)日志,發(fā)現(xiàn)以下錯誤:
InnoDB: Error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0
5242880 bytes
InnoDB: than specified in the .cnf file 0 104857600 bytes!
030826 1:42:15 Can't init databases
030826 1:42:15 Aborting
2,解決辦法
"
If you want to change the number or the size of your InnoDB log files, you
have to shut down MySQL and make sure that it shuts down without errors.
Then copy the old log files into a safe place just in case something went
wrong in the shutdown and you will need them to recover the database. Delete
then the old log files from the log file directory, edit my.cnf, and start
MySQL again. InnoDB will tell you at the startup that it is creating new log
files.
"
在你修改my.cnf的innodb_log_file_size參數(shù)前,請先停止mysql服務(wù)程序的運(yùn)行(mysql的停止沒有出現(xiàn)任何錯誤),并把/var/lib/mysql目錄下的ib_logfile0、ib_logfile1、ib_logfile2等之類的文件移除到一個安全的地方(舊日志文件的保留是為了防止意外的出現(xiàn)),以便Mysql重啟后可以將新的ib_logfile0之類日志文件生成到/var/lib/mysql目錄下。如果沒有什么意外,舊的日志文件可以刪除。
InnoDB: Error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0
5242880 bytes
InnoDB: than specified in the .cnf file 0 104857600 bytes!
030826 1:42:15 Can't init databases
030826 1:42:15 Aborting
2,解決辦法
"
If you want to change the number or the size of your InnoDB log files, you
have to shut down MySQL and make sure that it shuts down without errors.
Then copy the old log files into a safe place just in case something went
wrong in the shutdown and you will need them to recover the database. Delete
then the old log files from the log file directory, edit my.cnf, and start
MySQL again. InnoDB will tell you at the startup that it is creating new log
files.
"
在你修改my.cnf的innodb_log_file_size參數(shù)前,請先停止mysql服務(wù)程序的運(yùn)行(mysql的停止沒有出現(xiàn)任何錯誤),并把/var/lib/mysql目錄下的ib_logfile0、ib_logfile1、ib_logfile2等之類的文件移除到一個安全的地方(舊日志文件的保留是為了防止意外的出現(xiàn)),以便Mysql重啟后可以將新的ib_logfile0之類日志文件生成到/var/lib/mysql目錄下。如果沒有什么意外,舊的日志文件可以刪除。
相關(guān)文章
windows10系統(tǒng)安裝mysql-8.0.13(zip安裝) 的教程詳解
這篇文章主要介紹了windows10安裝mysql-8.0.13(zip安裝) 的教程,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2018-11-11
mysql數(shù)據(jù)庫之count()函數(shù)和sum()函數(shù)用法及區(qū)別說明
這篇文章主要介紹了mysql數(shù)據(jù)庫之count()函數(shù)和sum()函數(shù)用法及區(qū)別說明,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-06-06
通過實(shí)例學(xué)習(xí)MySQL分區(qū)表原理及常用操作
我們試著想一想, 在生產(chǎn)環(huán)境中什么最重要? 我感覺在生產(chǎn)環(huán)境中應(yīng)該沒有什么比數(shù)據(jù)跟更為重要. 那么我們該如何保證數(shù)據(jù)不丟失、或者丟失后可以快速恢復(fù)呢?只要看完這篇大家應(yīng)該就能對MySQL中數(shù)據(jù)備份有一定了解2019-05-05
ERROR 1862 (HY000): Your password has expired. To log in you
當(dāng)你在安裝 MySQL過程中,通過mysqld --initialize 初始化 mysql 操作后,生成臨時密碼后,沒有直接進(jìn)行 MySQL連接,中途重啟服務(wù)或者重啟機(jī)器等,導(dǎo)致密碼失效問題,怎么處理呢,感興趣的朋友一起看看吧2019-11-11

