By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,946 Members | 1,600 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,946 IT Pros & Developers. It's quick & easy.

Can't open file: 'mytable.ibd' (errno: 1)

P: n/a
Hi,

I read in the mysql manual that it's possible to copy the 'frm' files from
one mysql server to another, but when I try to do this I get the error
"Can't open file: 'mytable.ibd' (errno: 1)" on the detstination server.

There are no '.ibd' files anywhere on the server I'm copying the data from.
My database is using innodb.

TIA for any ideas

Andy
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Andy Fish wrote:
Hi,

I read in the mysql manual that it's possible to copy the 'frm' files from
one mysql server to another, but when I try to do this I get the error
"Can't open file: 'mytable.ibd' (errno: 1)" on the detstination server.


If you use InnoDB tables, but use the default mechanism of storing
multiple tables in one file, then you might not see any .ibd files.
Tables are instead stored together in InnoDB tablespace files, e.g.
"ibdata1" in the MySQL data directory.

There is an option you can use in the my.cnf to make InnoDB tables store
their data in tablename.ibd, one file per table.

I would guess that when you moved the .FRM file to another server
manually, it couldn't find the table in the InnoDB tablespace, so it
tried to find a file specific to that table: mytable.ibd. Not finding
the table in either storage location, it gave an error related to the
latter location it searched.

I would recommend using this method instead to move table definitions
between servers:

1. mysqldump --opt --no-data databasename tablename > tablename_create.sql
2. Copy tablename_create.sql to the other server
3. mysql newdatabasename < tablename_create.sql

Regards,
Bill K.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.