101001 18:39:29 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 109 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
InnoDB: Error: log file .\ib_logfile1 is of different size 0 52428800 bytes
InnoDB: than specified in the .cnf file 0 114294784 bytes!
101001 18:39:30 [ERROR] Default storage engine (InnoDB) is not available
101001 18:39:30 [ERROR] Aborting
101001 18:39:30 [Note] D:\MySQL5\bin\mysqld-nt: Shutdown complete
可以看到,ib_logfile0的問題解決了,但是同樣的問題卻出在ib_logfile1上面了。于是依樣畫葫蘆,把ib_logfile1刪了,再重啟MySQL服務(wù),卻發(fā)現(xiàn)沒用。難道是還要重啟系統(tǒng)。果真,把前面兩個ib_logfile刪了,重啟系統(tǒng)就搞定了。前面的可能是因為剛開機,所以也行。實際上是需要重啟系統(tǒng)的。這時的日志如下
101001 19:19:24 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 109 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
101001 19:19:26 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 109 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
InnoDB: Cannot initialize created log files because
InnoDB: data files are corrupt, or new data files were
InnoDB: created when the database was started previous
InnoDB: time but the database was not shut down
InnoDB: normally after that.
101001 19:19:27 [ERROR] Default storage engine (InnoDB) is not available
101001 19:19:27 [ERROR] Aborting
101001 19:19:27 [Note] D:\MySQL5\bin\mysqld-nt: Shutdown complete
好了,現(xiàn)在只剩下最后一個問題了Default storage engine (InnoDB) is not available。去services.msc里面啟動MySQL服務(wù),還是出錯。但是日志卻是顯示
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/mysql/en/Error_creating_InnoDB.html
101001 20:45:09 [ERROR] Default storage engine (InnoDB) is not available
101001 20:45:09 [ERROR] Aborting
101001 20:45:09 [Note] D:\MySQL5\bin\mysqld-nt: Shutdown complete
于是去網(wǎng)上搜索了一下,發(fā)現(xiàn)提示No valid checkpoint found.的解決辦法:刪除所有現(xiàn)有的ibdataN和ib_logfileN文件后,重啟Mysql。于是照做,果然行了。
InnoDB: The first specified data file D:\MySQL InnoDB Datafiles\ibdata1 did not exist:
InnoDB: a new database to be created!
101001 21:04:24 InnoDB: Setting file D:\MySQL InnoDB Datafiles\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
101001 21:04:25 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 109 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
101001 21:04:27 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 109 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
101001 21:04:31 InnoDB: Started; log sequence number 0 0
101001 21:04:32 [Note] D:\MySQL5\bin\mysqld-nt: ready for connections.
Version: '5.0.18-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
奮斗了一天,總算成功地把MySQL從MyISAM轉(zhuǎn)換成InnoDB引擎了。也學(xué)會了讀懂錯誤日志文件err文件了。不過我就在想了,如果從一開始就按照上面的做,不知道會怎么樣呢?