469,087 Members | 1,286 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,087 developers. It's quick & easy.

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

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
1 5943
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.

Similar topics

1 post views Thread by Cam | last post: by
7 posts views Thread by Lowell Kirsh | last post: by
7 posts views Thread by Jeff | last post: by
4 posts views Thread by Karthick S. | last post: by
52 posts views Thread by paytam | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.