MySQL Forums
Forum List  »  Data Recovery

Rebuild datafile from FRM
Posted by: Jeffrey Zollars
Date: December 01, 2008 04:24PM

Hi all, I'm new to mySql and am trying to recover a table datafile (fileName.MYD).

The table's datafile was apparently deleted. When I show the tables in the database, the table name does show up in the list. The FRM file does still exists in the /var/lib/mysql/<app> directory. However, the tableName.MYD file does not exist in the standard location. I've searched the entire /var mount point w/o finding the datafile. Of course, there is no backup of this server (I just took over ;-) )

Can I query the db to find the expected location per the database?

A query against that table gives ...

mysql> select * from tableName;
ERROR 1017 (HY000): Can't find file: 'tableName' (errno: 2)

I tried to repair the table with the repair table command ...
mysql> repair table tableName use_frm;

and got the message ...
Can't find file: 'tableName' (errno: 2)

I believe that we can drop/recreate the table w/o any serious loss at this point. I have not been able to find the syntax to create a table from the FRM yet.

Any assistance would be appreciated.

Thanks,
Jeff

Options: ReplyQuote


Subject
Views
Written By
Posted
Rebuild datafile from FRM
6915
December 01, 2008 04:24PM
3180
December 01, 2008 04:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.