maya wrote:It's amazing how many people do this. Copying files to/from the data> I had backed up my data, copied my db's back to
> 'data' dir but can't read the tables..
dir is not a safe or effective way to back them up or restore them. You
should use the "mysqldump" tool to back up, and the "mysql" tool to restore.
The ".frm" file is just a description of the table structure; it> ERROR 1016 (HY000): Can't open file: '<tableName>.ibd' (errno: 1)
> (tables have extension .frm, though..)
contains no data from that table.
This error indicates that you have a file
'<datadir>/<database>/<tableName>.frm" but MySQL cannot find any InnoDB
data for the table, either in the shared tablespace "<datadir>/ibdata1"
or in the per-table tablespace "<datadir>/<database>/<tableName>.ibd".
So you didn't restore the data when you copied files back to the
datadir, only the structure of the table.
By default, all your InnoDB tables share the ibdata1 tablespace file
(unless you deliberately enabled per-table InnoDB files).
I'm very sorry to say so, but if your ibdata1 file didn't get backed up
and restored, then the data in that file is now gone.