I have extracted the data directory of mysql from a backup and need to get the schema from an old table, however it's a backup from a different machine.
I have read a fair number of tutorials today on how to do this, but each time it seems to fail or I end up having to reinstall mysql because mysql hangs or crashes. I have tried the following:
- Create a different database
- Create table with same name in that database
- Replace file
- Stop/Start engine
- Recover from the
.frm
file
I have tried in various orders and combinations.
Is there any external tool that can extract the schema from the .frm
file? I can see the column names if I open up the file. I had a look but I can't seem to find anything that will enable me to do this.
Thanks in advance.
Best Answer
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"
In next submenu click on "from .frm file"
On the next view click on "Browse" and select an .frm file on a local disk. Click on "Upload"
Wait till it's doing the magic
Get the recovered structure.
It's also possible to upload an archive with a bunch of .frm files. The site will recover them altogether.