What I have learned from Google searching:

With MyISAM tables you can simply copy the FRM, MYD, and MYI files. In the folder for the DB I'm trying to recover, there are only FRM files and a "db.opt" file, so they must not be MyISAM tables.


My computer crashed, but the data is still on the hard drive. The MySQL 5.5.8 server was installed with WAMP on the crashed computer.

I have tried copying the entire data folder over, but MySQL only creates a blank database - no tables.

There is an FRM file for each of the tables I wish to recover. However, they are not readable text files. Is there any way to recover the table structure from these files?

This post https://stackoverflow.com/a/7688688/1188138 indicates that the structure is in fact in those files, but does not provide a method of retrieval.

Thank you so much - I have tried everything I can think of.

  • Is the location of the files on the new server the same as the old one?
    – Karlson
    Commented Feb 3, 2012 at 18:50
  • Yes - the relative path is data/[name of database] on both servers. I only copied the [name of database] folder (which contains the FRM files and the OPT file). No other files were copied.
    – Steve Burke
    Commented Feb 3, 2012 at 19:54

3 Answers 3


If you only see the .frm files, then there is a strong likelihood that the storage engine in use was InnoDB and innodb_file_per_table must have been off by default.

If you transferred everything from datadir on the crashed server onto another disk on another machine, you may be able to startup mysql with that folder as is.

For example, suppose ServerA is your crashed server and ServerB is where you want it placed.

  • Install MySQL 5.5.8 on ServerB
  • net stop mysql on ServerB to make sure mysql is down on ServerB
  • md C:\MySQLData on ServerB
  • Drop everything from the data folder on ServerA into C:\MySQLData on ServerB
  • Make C:\MySQLData the new datadir

Add this to my.ini on ServerB

  • C:\> del C:\MySQLData\ib_logfile* on ServerB
  • net start mysql on ServerB

Please try this and tell us what happened

UPDATE 2012-02-03 17:06 EDT

Since you were able to recover everything NOW DO THIS:

mysqldump -u... -p... -A -d --routines --triggers > C:\MySQLSchema.sql

This will give all table structures in the MySQL Instance.

  • This worked. I did a slightly different method where I renamed the current data folder to data2, then copied the old data folder over. Although I didn't need the data, it's worth noting that this method recovers the data as well. Thank you all! Commented Feb 3, 2012 at 21:57

If you copied the files to the new location, it is likely you copied the files with your user's permissions.

MySQL will need permission to read/write to the data directory.


At TwinDB we built a web interface to mysqlfrm. It's free and easy to use.

To recover table structure from you just need to upload the .frm file.

Here are steps. 1. Open https://recovery.twindb.com/ . Click on "Recover Structure" enter image description here

  1. In next submenu click on "from .frm file" enter image description here

  2. On the next view click on "Browse" and select an .frm file on a local disk. Click on "Upload" enter image description here

  3. Wait till it's doing the magic enter image description here

  4. Get the recovered structure. enter image description here

It's also possible to upload an archive with a bunch of .frm files. The site will recover them altogether.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.