Mysql – Recover MySQL tables from frm files

database-restoreMySQLrestore

I'm desperate, and hoping some kind soul can rescue me! I'm dealing with restoring a completely crashed server. Everything is back up except for there's an issue with one domain which uses MySQL (no other domains on the server use MySQL). The server is Windows 2008, running Plesk 9.5.

The MySQL database has been restored (I'm not sure how exactly) but only two of the 8 tables are available (the website can't connect to the other 6, and they are not visible through PHPMyAdmin).

I'm not a server admin, I'm a front-end web developer, and my server admins are telling me that the 6 tables have been 'LOCKED' and aren't accessible. I'm just desperate to find a way to get the data accessible.

Basically, the data has been copied from the crashed server. We have access to the old C drive. On that C drive, the data files for the MySQL database have been copied to the rebuilt server. So on the rebuilt server we have this folder:

C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\Data

In this folder are the following folders/files:

/my_database
    /tblnews.MYD
    /tblpage.MYD
    /tblhospice.frm
    /tblevent.frm
    /tblpage.frm
    /tblnews.frm
    /tblgallery.frm
    /tbleventcategory.frm
    /tblhospiceregion.frm
    /tbleventregion.frm
    /tblnews.MYI
    /tblpage.MYI
    /db.opt

/mysql
    / *loads of frm, MYD and MYI files, such as 'columns_priv.frm', 'func.frm' etc.

/ib_logfile0
/ib_logfile1
/ibdata1
/my.ini
/Server5797.err
/Server5797.pid

The two tables which ARE working are tblnews and tblpage. These are the ones which have MYI and MYD files too. The 6 tables which don't work are the ones which only have .frm files.

Is there any way I can get the data from anywhere here to restore the 6 inaccessible tables? Some way I can get a working copy on my local PC and script the data out perhaps?

Many thanks for any help anyone can give on this. I truly, truly appreciate it.

Best Answer

I can confirm it is indeed possible to recover data with only .frm and ibdata1 files. See here: http://www.nerdydork.com/restoring-mysql-innodb-files-on-windows.html. My solution was a little more difficult and my config settings etc were all in different places, but generally that solution worked for me... and saved my life too ;)

Related Topic