Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

i have moved my mysql database from another computer, but when i moved to the other some table seems doesn't exist, when i check to mysql data folder, the MYI and MYD from table is gone, just FRM left, how do i create the same table structure from existing FRM ? never mind if the data is gone. i just need the structure, so how i could do that ? by the way, i am using windows, i have try with this command but it seem doesn't work

mysql> repair TABLE m_tarif2012 USE_FRM;
+-----------------------+--------+----------+------------------+
| Table                 | Op     | Msg_type | Msg_text         |
+-----------------------+--------+----------+------------------+
| rsud_2012.m_tarif2012 | repair | Warning  | Can't open table |
| rsud_2012.m_tarif2012 | repair | status   | Operation failed |
+-----------------------+--------+----------+------------------+
2 rows in set (0.01 sec)
share|improve this question
add comment

migrated from stackoverflow.com Oct 1 '12 at 15:18

This question came from our site for professional and enthusiast programmers.

2 Answers

I have never done it, but this blog post might be useful. You should be able to just create the .MYI and .MYD files (with the correct mysql file permissions) to recover the table structure. But as you said, you won't have the data recovered.

share|improve this answer
add comment

I just answered a question like this 8 days ago

How can extract the table schema from just the .frm file?

There is a Windows Utility to Regenerate the CREATE TABLE SQL to stdout

I tried it out on mysql.user's .frm to see what it makes. It worked that day.

Give it a Try !!!

share|improve this answer
    
Then why answer the question, instead of voting to close the question as a duplicate? –  Aaron Bertrand Jun 19 '13 at 19:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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