Forum Moderators: coopster
#1016 - Can't open file: 'file.ibd' (errno: 1)
It's pretty clear that the tables are corrupt. Unless you know a way to try to restore the files.
Here's a brief, and unfortunate history. While I was away and traversing the Appalachian's, the MySQL Service on the PC was accidentally damaged/removed. That's the long story short. The day I returned saw a new install of the MySQL Service on the PC, and I thought I had managed to restore all the tables. Now I'm discovering that I did not.
Is there a hope of recovery for these tables? A search of the PC doesn't find any of the missing files.
<OT>
I'm wondering how much longer it will be before we see a MySQL forum...
</OT>
When I run CHECK TABLE I receive the error
Table database.table_one: error = Can't open file: 'table_one.ibd' (errno: 1)
The query REPAIR TABLE `table_one` USE_FRM is not repairing the table. So, I'm recreating some of my tables using the original scripts that I have. Now when I take a peek at the Windows directory I can see the new table_one.frm file, but not the .MYI and .MYD files. What has happened to those 2 files? The table and data are OK from phpMyAdmin after I run the re-creation script.
Did you originally create the tables as ISAM or InnoDB?
It looks like the default table type is InnoDB. The affected table are all relatively new, and the scripts I used to make them do not specify a type. I'm going to say they were created InnoDB. In the future my scripts will specify a table type too, probably MyISAM.
but do they work at that point?
Fortunately, all of the affected tables (21 of them) are not critical to our local operation. The older MyISAM tables seem to have been unaffected, which is a very good thing. Those are my customer, inventory and sales tables.
FWIW, I back up the web site tables on a regular basis, but not the localhost tables. Arrrgh.