日期:2014-05-16  浏览次数:20954 次

mysql 启动经典错误,大家来看看
我用innobackupex 备份文件后,然后用innobackupex 还原,先--apply-log 然后--copy-back,在还原前 先停止数据库,然后把 当前datadir里面东西都给删除。
但是在启动的时候居然报这样错误。我把ib_文件都删除, rm -rf ib_logfile* && rm -rf mysql-bin.* 还是不起作用,
这个是不是日志文件造成的,但是我的2个机器配置都是一样的,从A备份数据,然后到B还原,A B只是端口和数据库目录不一样,其他基本都是一致的。

然后我测试了一下把ibdata1 这个文件给删除,数据库可以正常启动,但是有个问题,却找不到表结构。显然问题就出在ibdata1文件上 但是这个文件不能删除。否则 .frm .ibd 就识别不了,

这个启动是什么错误?大家看看

111018 17:20:47 mysqld_safe Starting mysqld daemon with databases from /data/mysql/data3307
111018 17:20:47 [Note] Plugin 'FEDERATED' is disabled.
111018 17:20:48 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 256 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200
111018 17:20:49 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 256 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200
111018 17:20:51 InnoDB: Log file ./ib_logfile2 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile2 size to 256 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100 200
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.
111018 17:20:52 [ERROR] Plugin 'InnoDB' init function returned error.
111018 17:20:52 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
111018 17:20:52 [ERROR] Unknown/unsupported table type: INNODB
111018 17:20:52 [ERROR] Aborting

111018 17:20:52 [Warning] Forcing shutdown of 1 plugins
111018 17:20:52 [Note] /usr/local/mysql3307/bin/mysqld: Shutdown complete

111018 17:20:52 mysqld_safe mysqld from pid file /data/mysql/data3307/szgeobetadb2.morningstar.com.pid ended

------解决方案--------------------
表坏了