Mysql – Error When Restoring Backed Up Tables

MySQLrestore

I followed directions from this page: https://serverfault.com/questions/271367/importing-data-from-myd-back-up-file

I dropped the 3 files ( t2010_08.frm, t2010_08.myd, t2010_08.myi ) into my /var/lib/mysql directory.

Then I changed permission with the "chown mysql:mysql t2010_08.* command". Now, when I go to look at my table ( in HeidiSQL ), it tells me that it is type "View" and I get "Can't find file: 't2010_08' (errno:2) message.

What do I still need to do to gain access to this table?

Best Answer

I think I got it.

Here is the table as it appears in Linux from the Chat Session

-rw-rw----. 1 mysql mysql 9478 Jul 30 07:18 /var/lib/mysql/bsgtran/t2010_08.frm 
-rw-rw----. 1 mysql mysql 1882892084 Jul 30 07:21 /var/lib/mysql/bsgtran/t2010_08.myd 
-rw-rw----. 1 mysql mysql 74588160 Jul 30 07:22 /var/lib/mysql/bsgtran/t2010_08.myi

Since the database is on a Linux OS, filenames are case-sensitive.

Here is the solution

mv /var/lib/mysql/bsgtran/t2010_08.myd /var/lib/mysql/bsgtran/t2010_08.MYD
mv /var/lib/mysql/bsgtran/t2010_08.myi /var/lib/mysql/bsgtran/t2010_08.MYI

File extensions must be uppercase for MyISAM tables in Linux

Give it a Try !!!