Linux下mysql重裝後無法重啟解決辦法
之前裝的mysql5.1,但是經過系統還原後服務沒有了,干脆升級到5.5,但是安裝好了,配置時最後一步就是啟動不了!
查看日志:programdata/data/pc.err發現:
111121 22:16:50 InnoDB: Log file .ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .ib_logfile0 size to 10 MB
InnoDB: Database physically writes the file full: wait…
111121 22:16:50 InnoDB: Log file .ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .ib_logfile1 size to 10 MB
InnoDB: Database physically writes the file full: wait…
111121 22:16:50 InnoDB: Cannot initialize created log files because
111121 22:16:50 InnoDB: data files are corrupt, or new data files were
111121 22:16:50 InnoDB: created when the database was started previous
111121 22:16:50 InnoDB: time but the database was not shut down
111121 22:16:50 InnoDB: normally after that.
111121 22:16:50 [ERROR] Plugin ‘InnoDB’ init function returned error.
111121 22:16:50 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
111121 22:16:50 [ERROR] Unknown/unsupported storage engine: INNODB
111121 22:16:50 [ERROR] Aborting
在網上一查,原來要將ib_logfile0,ib_logfile1,還有ibdata1這三個文件刪掉才行,它們分別在data和programdata目錄中(在配置時由你指定的)。
windows下mysql重裝後無法重啟解決辦法
解決方法:
1: 先卸載mysql, 手動將其安裝目錄裡沒有刪除干淨的文件全部刪除.
2: 將C:/ProgramData/MySQL 裡有關mqsql的文件全部刪除.
3: 重新安裝 mysql 程序.
mysql服務就可以正常啟動了