InnoDB doesn't use any *.MYI, only *.FRM.  The indexes are in the data
files.

You might check the 4th byte of the .FRM file.  x'0C'=InnnoDB, x'09'=MyISAM.

If the InnoDB data files are good, there was a post earlier this year from
Heikki Tuuri about how to get the structure from there.

If the .FRM file is good, I posted a way to recover the structure--it's
worked for a few people.  A copy of the post is at the end of this message.

========== original message follows ==========

From: Yann Larrivee <[EMAIL PROTECTED]>
To: "V. M. Brasseur" <[EMAIL PROTECTED]>
Subject: Re: can not find file *.MYI
Date: Mon, 6 Sep 2004 20:07:12 -0400
Cc: [EMAIL PROTECTED]

On September 6, 2004 18:33, V. M. Brasseur wrote:
> Your index files appear to have disappeared during your archive.  You
> can rebuild them though.  Have a look at the "Table Maintenance and
> Crash Recovery" section of the manual:
>
> http://dev.mysql.com/doc/mysql/en/Table_maintenance.html
>
> Pay particular attention to the "REPAIR TABLE" syntax.  That will give
> you want you need.
>
> Cheers,
>


"As of MySQL 4.0.2, there is a USE_FRM mode for REPAIR TABLE. Use it if the=
=20
`.MYI' index file is missing or if its header is corrupted. "

This seems to be my situation, but all my tables used to be innodb plus i a=
m=20
using 4.0.18 at this moment.

I did change the permissions to the proper group but it did not change=20
anything to my situation.

Is there any other way to fix this without upgrading ?

Thanks

Yann Larriv=E9e

========== Copy of earlier post on recovering structure from InnoDB .frm
files ==========

Try the following

(0) Make sure you have the .frm files backed up

(1) If you have foo.frm, delete foo.* from the data directory, then create
a new MyISAM table.  Doesn't matter what's in it.  E.g., create table foo (x
int).

(2) Copy your saved .frm file back instead of the one just created.

(3) If the table you lost was InnoDB, change the 4th byte of the file
from hex 0C to hex 09.  (This makes it look like a MyISAM .frm)

(4) You should be able to run "show create table foo" from the MySQL client.



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

Reply via email to