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ù)程序的運行(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ù)程序的運行(mysql的停止沒有出現(xiàn)任何錯誤),并把/var/lib/mysql目錄下的ib_logfile0、ib_logfile1、ib_logfile2等之類的文件移除到一個安全的地方(舊日志文件的保留是為了防止意外的出現(xiàn)),以便Mysql重啟后可以將新的ib_logfile0之類日志文件生成到/var/lib/mysql目錄下。如果沒有什么意外,舊的日志文件可以刪除。
相關(guān)文章
MySQL8.0開啟遠(yuǎn)程連接權(quán)限的方法步驟
MySQL8.0設(shè)置遠(yuǎn)程訪問權(quán)限,找了一圈都沒找到一個適用的,索性自己寫一個,這篇文章主要給大家介紹了關(guān)于MySQL8.0開啟遠(yuǎn)程連接權(quán)限的方法步驟,需要的朋友可以參考下2022-06-06node連接mysql數(shù)據(jù)庫遇到的問題和解決方案
這篇文章主要介紹了node連接mysql數(shù)據(jù)庫遇到的問題和解決方案,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-10-10MySQL中Decimal類型和Float Double的區(qū)別(詳解)
下面小編就為大家?guī)硪黄狹ySQL中Decimal類型和Float Double的區(qū)別(詳解)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-03-03