Mark,

----- Original Message ----- 
From: "Mark Morley" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Thursday, May 29, 2003 10:48 PM
Subject: RE: Recovering table structures from .frm files?


> > I have a couple of .frm files with no corresponding data or index
> > files.  Is it possible to recover the table structure (field names,
> > types, sizes) from these files?
>
> More info: these appear to have been created under MySQL 4.0.x and they
were originally InnoDB files.  I can see a list of field names by running
"strings" on each .frm file, but I'd really like to get the colum types and
sizes as well.
>

there was a similar question a couple of months back.

If I recall, the solution is to create a dummy InnoDB table with the same
name and a primary key which contains at least as many columns as you had in
the primary key of the original table.

Then replace the dummy .frm file by the .frm file you want to read. This
fools mysqld and it allows you to call SHOW CREATE TABLE ...

> Is the file format documented anywhere?
>
> Mark

Best regards,

Heikki Tuuri
Innobase Oy
http://www.innodb.com
Transactions, foreign keys, and a hot backup tool for MySQL
Order MySQL technical support from https://order.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