修改了mysql配置文件my.cnf中的innodb_flush_log_at_trx_commit(原來沒有這一項),重啓後報錯,而後把此項去掉後,innodb卻不能加載,致使網站不能訪問。日誌中報錯mysql
[ERROR] Plugin 'InnoDB' init function returned error.sql
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.數據庫
從網站後臺查看是:Syntax error or access violation: 1286 Unknown table engine 'InnoDB'。ide
進mysql中用show plugins;看不到innodb。網站
修改innodb_log_file_size後,要是出現上述問題,解決方法也是同樣。spa
解決辦法是移除mysql數據庫目錄下的ib_logfile0, ib_logfile1。日誌