MySQL从MyISAM转换成InnoDB错误与常用解决办法

2019-01-03 18:29:01王冬梅
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:MySQL5binmysqld-nt: Shutdown complete

好了,现在只剩下最后一个问题了Default storage engine (InnoDB) is not available。去services.msc里面启动MySQL服务,还是出错。但是日志却是显示
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:MySQL5binmysqld-nt: Shutdown complete

于是去网上搜索了一下,发现提示No valid checkpoint found.的解决办法:删除所有现有的ibdataN和ib_logfileN文件后,重启Mysql。于是照做,果然行了。
InnoDB: The first specified data file D:MySQL InnoDB Datafilesibdata1 did not exist:
InnoDB: a new database to be created!
101001 21:04:24  InnoDB: Setting file D:MySQL InnoDB Datafilesibdata1 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