程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> 關於MYSQL數據庫 >> mysql 有關“InnoDB Error ib_logfile0 of different size”錯誤

mysql 有關“InnoDB Error ib_logfile0 of different size”錯誤

編輯:關於MYSQL數據庫
1,查看Mysqld(/var/log/mysqld.log)日志,發現以下錯誤:
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參數前,請先停止mysql服務程序的運行(mysql的停止沒有出現任何錯誤),並把/var/lib/mysql目錄下的ib_logfile0、ib_logfile1、ib_logfile2等之類的文件移除到一個安全的地方(舊日志文件的保留是為了防止意外的出現),以便Mysql重啟後可以將新的ib_logfile0之類日志文件生成到/var/lib/mysql目錄下。如果沒有什麼意外,舊的日志文件可以刪除。
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved