在没有准备步骤的情况下从percona恢复后,ib_logfile0和ib_logfile1在还原数据中不存在。为此,在启动过程中观察到以下消息:
140223 04:10:24 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140223 04:46:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140223 4:46:51 InnoDB: Initializing buffer pool, size = 18.0G
140223 4:46:54 InnoDB: Completed initialization of buffer pool
140223 4:46:54 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
140223 4:46:54 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140223 4:46:54 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140223 4:46:55 InnoDB: Error: page 7 log sequence number 45 3368182252
InnoDB: is in the future! Current system log sequence number 42 975484940.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html我怎么才能解决这个问题?
发布于 2014-03-06 18:40:50
你有三种选择
)
准备步骤的目的是要随身携带原木。你必须回去再次运行备份。
相反,重新发明轮子,请看我的帖子InnoDB日志序列号是未来的。
这是相当危险的,但是您可以对活动的MySQL实例多次运行rsync,直到两个连续的rsyncs花费相同的时间。然后,关闭源上的mysql,再运行一个rsync。然后,经过尽职调查,在新服务器上启动mysql。
见我早些时候的帖子有什么更好的办法“在未来”摆脱MySQL InnoDB日志吗?
发布于 2017-07-04 09:46:46
这篇博客文章描述了一种在没有ib_logfile0和ib_logfile1的情况下从frm和ibd文件中恢复数据的方法。(当然,这不会恢复只写入日志文件的数据。)这份指南有点粗糙,需要到处修改,但却为我工作过。
https://dba.stackexchange.com/questions/60337
复制相似问题