2018-02-28T02:38:00.618787Z 0 [ERROR] InnoDB: ./ib_logfile0 can't be opened in read-write mode.
2018-02-28T02:38:00.618805Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-02-28T02:38:01.219287Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-02-28T02:38:01.219316Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-02-28T02:38:01.219323Z 0 [ERROR] Failed to initialize plugins.
2018-02-28T02:38:01.219332Z 0 [ERROR] Aborting
2018-02-28T02:38:01.219340Z 0 [Note] Binlog end
2018-02-28T02:38:01.219885Z 0 [Note] mysqld: Shutdown complete
原因:因爲是之前使用過的數據庫,現在需要重新部署,就要清空log文件。
解決方法:
1、關閉mysql數據庫
2、進入mysql的data目錄,刪除以下3個文件:ib_logfile0和 ib_logfile1 ib_logfile2
[root@localhost data]# mv ib_logfile0 ib_logfile0.bak
[root@localhost data]# mv ib_logfile1 ib_logfile1.bak
[root@localhost data]# mv ib_logfile2 ib_logfile2.bak
3、重新啓動mysql