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

來源:互聯網
上載者:User

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目錄下。如果沒有什麼意外,舊的記錄檔可以刪除。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.