List:General Discussion« Previous MessageNext Message »
From:Werner Stuerenburg Date:July 14 2001 12:35pm
Subject:Re[6]: Urgent problem : recovering a table with no MYI file ?
View as plain text  
> when you run myisamchk it try to find the .MYI file.
> If you try to run myisamchk on the MYD file, it says that the key definition
> is incorrect (which seems to be normal ;))

The key definition should be part of the .frm file, in my
understanding. Oh, I see, myisamchk is invoked on that very file.

I tried to reconstruct your case. And I could recover the table
in my case. Here is what I did:

Read the manual, in particular
      http://www.mysql.com/doc/R/e/Repair.html

It says: you should empty your table to get over a missing or
corrupt MYI file.

First I tried to trick with an MYI file from another empty table,
but this did not work.

DELETE FROM table worked, though. Before that, I copied
table.MYD, of course. Next DELETE FROM table. After that, I shut
the server down to be able to copy the data copy back to
table.MYD.

Now I had a clean table.MYI. Next I did a myisamchk and it worked
fine (with -f switch).

Hope it will work in your case, too.

-- 
Herzlich
Werner Stuerenburg            

_________________________________________________
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de


Thread
Urgent problem : recovering a table with no MYI file ?Fournier Jocelyn [Presence-PC]14 Jul
  • Re: Urgent problem : recovering a table with no MYI file ?Jeremy Zawodny14 Jul
Re[6]: Urgent problem : recovering a table with no MYI file ?Werner Stuerenburg14 Jul