Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Recover Tables From A MySQL .frm File
warriors
post May 9 2005, 10:13 AM
Post #1


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 30
Joined: 9-May 05
Member No.: 4,896



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
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post May 9 2005, 02:17 PM
Post #2


PsYcheDeLiC dR3aMeR
Group Icon

Group: Admin
Posts: 2,242
Joined: 29-January 05
From: Nakorn Chaisri, Thailand
Member No.: 2,411



Here's a page from the MySQL manual that might help you solve your problem: http://dev.mysql.com/doc/mysql/en/backing-up.html

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
Go to the top of the page
 
+Quote Post
warriors
post May 9 2005, 02:26 PM
Post #3


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 30
Joined: 9-May 05
Member No.: 4,896



i don't have the .ibd files or ibdata file. i only have the .frm files.
Go to the top of the page
 
+Quote Post
oncombeureum
post May 10 2005, 02:27 AM
Post #4


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 28
Joined: 17-April 05
Member No.: 4,081



.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.

QUOTE
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.


QUOTE
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
Go to the top of the page
 
+Quote Post
warriors
post May 10 2005, 05:24 AM
Post #5


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 30
Joined: 9-May 05
Member No.: 4,896



well seems like theres no way. tks anyway
Go to the top of the page
 
+Quote Post
Luiz Pestana
post Jun 6 2008, 08:08 PM
Post #6


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 6-June 08
Member No.: 30,814



QUOTE(warriors @ May 10 2005, 02:24 AM) *
well seems like theres no way. tks anyway


Hi, i found way to restore innodb with only .frm files. rolleyes.gif

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
Go to the top of the page
 
+Quote Post
iGuest
post Jun 6 2008, 07:52 PM
Post #7


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



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
Go to the top of the page
 
+Quote Post
iGuest
post Jul 20 2008, 09:28 AM
Post #8


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



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
Go to the top of the page
 
+Quote Post
iGuest
post Aug 6 2008, 09:00 AM
Post #9


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. MySQL - Trouble With Bulk Insert Statements(3)
  2. MySQL Realtime Replication(4)
  3. Mirror My MySQL Database To Another Mysql Server(4)
  4. How To Connect MySQL With Flash?(8)
  5. MySQL Output Database Question(18)
  6. MySQL, Multiple Tables(24)
  7. Linking Two Tables(12)
  8. Navcat For MySQL(8)
  9. Permission Problem With Mysql Database Creation(8)
  10. Mysql And Php(15)
  11. Problems With Php Saving Data Into Mysql(6)
  12. Login System Using A Mysql Db(5)
  13. Oracle Vs. Mysql Vs. Postgresql(9)
  14. Subqueries In Mysql(1)
  15. Apache Php With Mysql On Windows [solved](9)
  1. Not Understanding Mysql(4)
  2. Mysql Script Help(3)
  3. Mysql - So Hard(14)
  4. Mysql Problem(1)
  5. Sun Bought Mysql(6)
  6. Mysql Backup With Another Address?(4)
  7. I Have An Error With My Mysql Connection(7)
  8. Mysql And User File_priv(0)
  9. Mysql Database Management(1)
  10. Mysql Database Entry By Excel Sheets(2)
  11. Mysql On Computer(9)
  12. Any Website Provide Free Host Mysql Host?(4)
  13. Mysql Multiple Tables(1)


 



- Lo-Fi Version Time is now: 8th September 2008 - 02:26 AM