我用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] Aborting111018 17:20:52 [Warning] Forcing shutdown of 1 plugins
111018 17:20:52 [Note] /usr/local/mysql3307/bin/mysqld: Shutdown complete111018 17:20:52 mysqld_safe mysqld from pid file /data/mysql/data3307/szgeobetadb2.morningstar.com.pid ended
但是在启动的时候居然报这样错误。我把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] Aborting111018 17:20:52 [Warning] Forcing shutdown of 1 plugins
111018 17:20:52 [Note] /usr/local/mysql3307/bin/mysqld: Shutdown complete111018 17:20:52 mysqld_safe mysqld from pid file /data/mysql/data3307/szgeobetadb2.morningstar.com.pid ended
解决方案 »
- java程序如何连接使用PL/Proxy方式集群的数据库
- mysql 创建视图时报错,请各位大侠帮忙看看错在哪里
- mysql delete 数据还原
- mysql客户端如何运行begin...end复合语句
- 一个游标问题
- 安装postgresql7.4.1因该安装哪个包啊
- 各位大侠,救命啊。我要急疯了!
- 小弟有php空间,可是管理员没告诉我有没有mysql数据库,php空间是不是就不能用了?
- 哪位大哥能给我一份php+mysql写的类似选课系统,教务管理等的源码?
- mysql存储过程的统计sql
- 谁知道 mysql工具 show profiles 显示的duration的时间的单位是什么,秒,毫秒,微秒,纳秒,皮秒,飞秒
- 低版本的数据库如何附加到高版本的数据库里?
+------------+
| version() |
+------------+
| 5.1.39-log |
改成 MyISAM
数据库可以启动了,但是不支持Innodb
mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+但是发现原来备份都是Innodb的,现在读不了,而且