Xampp中的InnoDB损坏 [英] InnoDB Corruption in Xampp

查看:130
本文介绍了Xampp中的InnoDB损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两周前的备份,这是不得已的方法,但是DB文件本身看起来还不错,而且看来只是ibdata1文件出了问题.如前所述,我正在使用Xampp,启动后MySQL崩溃.这是错误日志: http://textuploader.com/7vfd

I have a backup from two weeks ago that will be a last resort, but the DB files themselves seem fine and it appears it's just the ibdata1 file that is having issues. As stated, I'm using Xampp and MySQL crashes right after I start it. Here is the error log: http://textuploader.com/7vfd

我没有做任何与众不同的事情;它似乎刚刚起步并停止工作.

I hadn't done anything out of the ordinary; it seemingly just up and stopped working.

我查看了InnoDB恢复,但是我尝试的解决方案要求MySQL能够运行,这不是由于损坏引起的.有没有办法用错误的ibdata1文件挽救那些可能完好的IBD文件?

I looked up InnoDB recovery, but the solutions I tried required MySQL to be functional, which it isn't due to the corruption. Is there a way to salvage what are presumably intact IBD files with a bad ibdata1 file?

我知道使用innodb_force_recovery = #并尝试过...除了我在错误的my.ini中尝试过.我必须使用bin文件夹中的那个.它现在似乎已修复.

I was aware of using innodb_force_recovery = # and I had tried it...except I had tried it in the wrong my.ini. I had to use the one in the bin folder. It appears to be fixed now.

推荐答案

ibdata1文件包含有关Mysql数据库的表空间信息和其他元数据.

The ibdata1 file contains the tablespace information and other metadata about your Mysql database(s).

您可以尝试一直使用innodb_force_recovery = 1innodb_force_recovery = 6来查看是否可以解决问题.尝试在您的my.cnf(对于Windows为my.ini)文件中更改此设置,然后尝试再次重新启动mysql服务器.

You can try using the innodb_force_recovery = 1 all the way to innodb_force_recovery = 6 to see if that rectifies the problem. Try changing this in your my.cnf (my.ini for windows) file and then attempt to restart your mysql server again.

如果您能够使用Recovery标志启动Mysql,则数据库将处于只读模式.您应该对数据进行mysqldump,停止mysql,重新安装,重新创建数据库,然后重新导入数据.

If you are able to start Mysql using recovery flag, your database will be in a read-only mode. You should do a mysqldump of the data, stop mysql, re-install fresh, create your database again, and import back in the data.

这里是有关innodb恢复的更多信息的链接 dev.mysql .

Here is a link for more info on innodb recovery dev.mysql.

如果您使用linux ...

If you use linux...

另一个更复杂的选择是使用percona恢复工具套件.这将重新对齐表空间.虽然,从经验来看,如果您是新手,导航会遇到一些挑战,并且要花一些时间才能实现.

Another more complex option is to use percona recovery tool kit. This will realign your tablespaces. Although, from experience its a bit of a challenge to navigate and takes a bit of time to implement if you are a newb.

但是,该工具箱的创建者akuzminsky(这太酷了!)提到他已经对该工具箱进行了重大改进.

However, akuzminsky the creator of the toolkit (how cool is that!) mentioned that he has made significant improvements to the toolkit.

下载工具包的链接 Percona.com

通过 chriSQL <.

链接到akuzinsky的网站 TwinDB .

Link to akuzinsky's website TwinDB.

除非数据对任务至关重要,否则我将只恢复两周前的备份.您最终可能花大量的时间和精力来恢复这些数据,而这可能无法带来好处.

Unless that data is mission critical, I would just revert back to the backup from 2 weeks prior. The amount of time and effort you may end up putting into recovering this data may out way the benefit.

这篇关于Xampp中的InnoDB损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆