Recovering MySQl database from .frm, ibdata and ib_logfile

痞子三分冷 提交于 2020-02-04 03:24:28

问题


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.


回答1:


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.



回答2:


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.



来源:https://stackoverflow.com/questions/2055545/recovering-mysql-database-from-frm-ibdata-and-ib-logfile

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!