List:General Discussion« Previous MessageNext Message »
From:Scott Wang Date:January 28 2002 11:07pm
Subject:Lost data
View as plain text  

Forgive me for butting in but I'm having a tragic problem with MySQL and could really use
some help.

I have two large tables in a database with a few million entries.  There is only one
column in each table.

Everything was working okay until today.  The size of the table files is  1gb+ but
PHPMyAdmin says it has no records.

When I try to export 200,000 of the contents to a text file:

mysql> select * from tbl_name limit 0,200000 into outfile "outfilename.txt";

It takes a couple minutes of processing but the resulting file is still 0k in size.  
PHPMyAdmin still says 0 records.  But the table files are huge - 800mb to 1gb.

Before I noticed this, I transferred the tables to another computer with MySQL installed. 
It took a long time to transfer so I know the file really was huge.  But now on both
computers the results are the same - no records.

I ran:

mysql>check table tbl_name;

and it says that it's fine.

mysql>restore table tbl_name;

Only takes the 1gb table files and turns them into 10k files, still no records.

Thankfully I have a backup on the other computer now that the table files are 10k.  The
other computer still has the 1gb files.

Is there any way to restore this data???  This happened suddenly with two different
tables, at the same time.  They were the two largest tables in the database - other
unaffected tables are smaller.

- Scott Wang

Lost dataScott Wang28 Jan