Recovering MySQl database from .frm, ibdata and ib_logfile

Akhil picture Akhil · Jan 13, 2010 · Viewed 9k times · Source

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.

Answer

Emil Vikström picture Emil Vikström · Jan 13, 2010

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.