Sign in to follow this  
warriors1405241493

Recover Tables From A MySQL .frm File

Recommended Posts

Here's a page from the MySQL manual that might help you solve your problem: http://forums.xisto.com/no_longer_exists/

I'm not too sure whether you can do it just on the basis of .frm files - do you have the .ibd files or ibdata file with them too ? If you have those the process becomes far easier... Read that page and see if it helps - and if it does, please come back here and make a post on what you did to solve your problem. That'll certainly be very helpful for all of us..

Thanks & Regards,
m^e

Share this post


Link to post
Share on other sites

.frm is a table created by mysql.
you can fine in there a series of field but no guarantee the data itself.

in order to rebuild the database using only .frm.

i think you should do it manualy then.

MySQL will always create a `.frm' file to hold the table and column definitions. The table's index and data will be stored in one or more other files, depending on the table type.

MySQL stores its data dictionary information of tables in `.frm' files in database directories. But every InnoDB type table also has its own entry in InnoDB internal data dictionaries inside the tablespace. When MySQL drops a table or a database, it has to delete both a `.frm' file or files, and the corresponding entries inside the InnoDB data dictionary. This is the reason why you cannot move InnoDB tables between databases simply by moving the `.frm' files, and why DROP DATABASE did not work for InnoDB type tables in MySQL versions <= 3.23.43.

further you should read at:

mysql

Oncom Beureum
The Best Place in the City

Share this post


Link to post
Share on other sites

Restoring with only .frm

Recover Tables From A MySQL .frm File

 

Replying to warriors

 

Hi, I found way to restore innodb with only .Frm files.

 

First create a database to restore and create the tables with same name of XXX.Frm files (with one field, only to create the .Frm files);

After, stop mysql service and replace the created .Frm files with saved .Frm files;

Finally, start mysql service and see, the tables are replaced with old columns, but sure, without data.

 

I hope it help.

Luiz Pestana

 

-reply by Luiz Pestana

Share this post


Link to post
Share on other sites

well seems like theres no way. tks anyway

Hi, i found way to restore innodb with only .frm files. :)

First create a database to restore and create the tables with same name of XXX.frm files (with one field, only to create the .frm files);
After, stop mysql service and replace the created .frm files with saved .frm files;
Finally, start mysql service and see, the tables are replaced with old columns, but sure, without data.

I hope it help.
Luiz Pestana

Share this post


Link to post
Share on other sites

Recover Tables From A MySQL .frm File

Recover Tables From A MySQL .frm File

 

Feedback for Luiz Pestana's reply:

 

Tried it and doesn't work. Mysqld-nt crashes when you try to access the db and the tables,

 

Sorry

Share this post


Link to post
Share on other sites

Replying to Luiz Pestana

Recover Tables From A MySQL .frm File

 

Hi,

 

The Procedure provided by you to retrive the data from .Frm as worked very well and the Table Structure as been restored not the Data

 

But No Issues

 

And many Thank's for the Solution

 

-reply by Manoj Kumar

Share this post


Link to post
Share on other sites
importing dataRecover Tables From A MySQL .frm FileI am trying to import sql file on the mysql server nothing is happening. Instead I just copy the data from Mysql Folder from another to the server and when Itry to open the database I am getting this errorSQL show index from `mbw_components` failed : Incorrect information in file: './db-rtsa-1/mbw_components.Frm' Please help.-question by Hilda

 

Share this post


Link to post
Share on other sites
Restore by renaming the filesRecover Tables From A MySQL .frm File

forums.Devshed.Com/mysql-help-4/mysql-installation-problems-197509.Html

 The steps in the above link worked for me. Renaming or removing the ib_* files. Cheers!

-reply by James

 

Share this post


Link to post
Share on other sites

Here's a page from the MySQL manual that might help you solve your problem: http://forums.xisto.com/no_longer_exists/
I'm not too sure whether you can do it just on the basis of .frm files - do you have the .ibd files or ibdata file with them too ? If you have those the process becomes far easier... Read that page and see if it helps - and if it does, please come back here and make a post on what you did to solve your problem. That'll certainly be very helpful for all of us..

Thanks & Regards,
m^e



I was able to restore data base usinf .frm files and copying 'ibdata1' file of data folder.

Share this post


Link to post
Share on other sites

I have a couple of .frm files with no corresponding data or index files. Is it possible to recover the table structure (field names, types, sizes, rows,col, etc) from these files? The table type is innodb

 

Perform a TRUNCATE on the table. It will initialise all associated files.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this