2

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)

2 Answers 2

2

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.

1

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

1
  • Then why answer the question, instead of voting to close the question as a duplicate? Commented Jun 19, 2013 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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