InnoDB: Error: log file ./ib_logfile0 is of different size ...
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
之前曾啟用過 InnoDB,後來卸載/禁用,**但 ib_logfile0、ib_logfile1 未刪除**。重新啟用時,新配置的 innodb_log_file_size 與舊文件大小不一致,InnoDB 拒絕啟動。
service mysqld stop
rm -f /var/lib/mysql/ib_logfile*
service mysqld start
datadir 權限(mysql:mysql)innodb_log_file_size 配置合理(≤ 2G 總和)/var/log/mysqld.log 進一步定位修改 innodb_log_file_size 後,**必須先停庫、刪舊日誌、再啟動**,否則 100% 報此錯。