问题
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