At 0:11 +0200 4/19/04, Gerd JuppJacke wrote:
Hello,


I need fast help. My .frm-files are deleted on MyIsam MySQL. The other two files types (myd and myi) of each table are still there but the frm-files are deleted. The database does not work any more.

How can i reconstruct the database with the two types to save everything.

I assume you don't have the .frm files in a backup somewhere?


1. Determine why the .frm files got clobbered, so you can prevent it from
happening again.
2. Make a backup of the .MYD and .MYI files, in case of a mistake during
the following steps.
3. For each table to be restored, follow this procedure:
  a. In the shell, rename the .MYD and .MYI files.  For example:
     mv x.MYD x.MYD.orig
     mv x.MYI x.MYI.orig
  b. In the mysql program, issue the *exact* CREATE TABLE statement that
     will create a table with the same structure as the to-be-restored
    table.  If you don't know what this statement is, you're out of luck.
  c. In the mysql program, issue a FLUSH TABLES statement.
  d. In the shell, rename the file from a. back to their original names:
     mv x.MYD.orig x.MYD
     mv x.MYI.orig x.MYI
  Table x should now be restored.  Repeat for the other tables.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to