Recovering MySQl database from .frm, ibdata and ib

2019-07-18 20:02发布

I have .frm, ibdata and ib_logfile from my previous version of MySQl and now I have shifting to a newer version. Unfortunately, I donot have the previous version installed so I cannot take the dump and import into the new MySQl version.

Please suggest some way to get these databases running in the newer MySQL version. I have all the required files from the previous MSQl.

标签: mysql recover
2条回答
别忘想泡老子
2楼-- · 2019-07-18 20:43

Well, it may seem trivial. But since I had saved the entire MySQL folder present in Program Files from my previous installation. I found out that I could still use that folder to run the previous MySQL installation without any changes or reinstallation (it seems MySQl works like Linux softwares). And now I am using mysqldump to create the dump and then will import it into the new MySQL version.

查看更多
迷人小祖宗
3楼-- · 2019-07-18 20:48

It's really dangerous to do this, so just do it on a copy of the files (and try hard to use the exact same version of MySQL):

  • Make sure the MySQL service is not running
  • Remove the ib_logfile (it is not needed)
  • Put the files in place in the MySQL datadir
  • Start your server and check the logfiles.
  • Check that everything is working.
查看更多
登录 后发表回答