SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict bimalpoudel's Avatar
    Join Date
    Feb 2009
    Location
    Kathmandu, Nepal
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Recover MySQL data without .myi file (but with .myd and .frm)

    I have a mysql data with a loss of .myi file.
    I have .myd and .frm files.

    How can I recover the table and data now?
    Bimal Poudel @ Sanjaal Framework over Smarty Template Engine
    ASKING INTERESTING QUESTIONS ON SITEPOINT FOURM

    Hire for coding support - PHP/MySQL

  2. #2
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,551
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    You should be able to put those files into your mysql operating directory e.g /var/lib/mysql/somedbname
    Then perform

    CHECK TABLE somedbname;

    and if necessary

    REPAIR TABLE somedbname;

    You'll be missing the indexes which are in the .myi file (the .frm is the structure and the .myd is the data) , if you do the REPAIR TABLE it should rebuild them.

    Note that .frm file is quite mysql version specific so you should only do this on the same version.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •