Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lost table structure file (MYI)

    So I came to work this morning and instantly get hammered by a problem. That alone is quite ordinary, but the catch is that I'm having trouble figuring this one out, so here I am.

    I have a table by the name of 'users' which is apprently unusable due to the apparent loss of it's .MYI file. When I try to access the table, it claims it can't find users.MYD, but upon checking the files, it's present and .MYI is not -- so I'm continuing under the assumption that it can't find .MYD due to the missing .MYI file.

    So my question is thus: What would cause that file to be deleted? Access is limited on the server and root access even moreso, so I can't imagine it being manually deleted. Could it have been automatically removed if it breached it's set max keyfile length? But the even more important question is: can I correct the problem without losing all the information in the table?

    Any help is greatly appreciated.

    Thanks,
    Dave Mittner

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Spookster
    http://www.mysql.com/doc/en/Repair.html
    I saw that page prior to posting here, but it didn't have anything that helps. The myisamchk tool seems to require the .MYI file to even begin assessing table problems, so since I don't have that file to begin with, that tool is unusable.

    Unfortunately time didn't allow for extended research so I ended up just dropping what was left of that table and created it new. We just cut our losses and have begun population of it as normal.

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    one word comes to mind here....ummmm. Backups are good.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #5
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Spookster
    one word comes to mind here....ummmm. Backups are good.
    That's three words, unless you meant the "ummmm", which isn't even a word. But I agree. This happened on a system I just recently inhereted and I haven't yet had the opportunity (or means) to create regular backups. Needless to say, this little incident has helped me convince my superiors that changes are needed.

  • #6
    Regular Coder
    Join Date
    Apr 2003
    Location
    Montreal, QC
    Posts
    340
    Thanks
    3
    Thanked 2 Times in 2 Posts
    So, I'm having the same problem. However, it appears that the problem can be fixed by restarting the MySQL Server. This is somewhat of a pain as you may imagine and I would like to simply make it so my .MYI files stay intact.

    Anyone have any idea what is causing them to dissapear?

    Thanks in advance,

    John
    Search for Laughter or Just Search?
    GiggleSearch.org
    Blog: www.johnbeales.com
    All About Ballet: www.the-ballet.com

  • #7
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what mySQL version are you running ?
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #8
    Regular Coder
    Join Date
    Apr 2003
    Location
    Montreal, QC
    Posts
    340
    Thanks
    3
    Thanked 2 Times in 2 Posts
    4.0.18-standard
    Search for Laughter or Just Search?
    GiggleSearch.org
    Blog: www.johnbeales.com
    All About Ballet: www.the-ballet.com

  • #9
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm. Been looking around a bit and this problem seems to be quite common. All sources say the same : run a repair or a myisamchk.

    This http://dev.vikingnetwerkz.com/module...upt-table.html was the best doc i ould find. Contains a lott of links to additiobal info. Hope it helps.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #10
    Regular Coder
    Join Date
    Apr 2003
    Location
    Montreal, QC
    Posts
    340
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Thanks. I read the page and I think it'll help. I've also discovered the MySQL Logs and I'm going to try to find out what the problem is next time it happens.

    John
    Search for Laughter or Just Search?
    GiggleSearch.org
    Blog: www.johnbeales.com
    All About Ballet: www.the-ballet.com


  •  

    Posting Permissions

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