当前位置:Gxlcms > 数据库问题 > 记一次mysql数据恢复

记一次mysql数据恢复

时间:2021-07-01 10:21:17 帮助过:6人阅读

11:31:27 InnoDB: Error: page 7 log sequence number 1055477743 InnoDB: is in the future! Current system log sequence number 566049292. 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.5/en/forcing-innodb-recovery.html InnoDB: for more information. 170121 11:31:27 InnoDB: Error: page 1 log sequence number 1055476531 InnoDB: is in the future! Current system log sequence number 566049292. 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.5/en/forcing-innodb-recovery.html InnoDB: for more information.

9.看到了报错,日志文件与数据文件内容不符。 证明数据文件是读到了的,只是,没有业务用户,没有表的定义。重新与报表工程师沟通,得知业务库数据库名为JD,用户也为JD。开始感觉有地方不对劲了,如果只是Innodb的数据文件损坏,mysql.user中应该是有用户记录的呀,怀疑这个安装目录不是原始的Mysql安装目录。

10.找到原始安装目录,进行目录替换。

11.可以查到数据了。尝试通过mysqldump 的方式导出数据。

mysqldump --database jd > jd_db.sql

之后搭建好新的环境,导入数据库,创建好用户,授权。(唯一注意的一点是字符集的问题)

至此整个数据恢复工作完成。

记一次mysql数据恢复

标签:.sql   database   文件   system   erro   alt   man   分享   sql   

人气教程排行