Skip navigation links

MySQL Forums :: InnoDB :: Can't open file ****.ibd (errno: 1)


Advanced Search

Re: Can't open file ****.ibd (errno: 1)
Posted by: Heikki Tuuri ()
Date: November 04, 2005 10:27AM

Christopher,

if you are not using the [mysqld] option

innodb_file_per_table

then an InnoDB table consists of

1) the .frm file in the database directory,
2) the table data dictionary entry and data in the ibdata files.

If 1) is missing, you can create the table in some other database, and copy the .frm file from there.

If 2) is missing, you can simply delete the .frm file manually.

After this, you are in a consistent state.

---

If you are using

innodb_file_per_table

then an InnoDB table consists of:

1) the .frm file in the database directory,
2) data dictionary entry in the ibdata files,
3) the .ibd file.

If MySQL complains it can't open file x.ibd, that means either 2) or 3) or both are missing. You should look into the .err log of mysqld to determine which is the case.

If 1) is missing, do like above.

If 2) is missing, then simply delete the .frm file manually (and also the .ibd file if that one exists).

If 3) is missing, you should upgrade to a recent 4.1.xx or 5.0.xx version, and simply DROP the table. Earlier versions had the problem that if you did not have the option

no-auto-rehash

in the [mysql] section of your my.cnf, then dropping a table with a missing .ibd file did not work.

I think we should add these detailed instructions to the manual.

Best regards,

Heikki
Oracle Corp./Innobase Oy
InnoDB - transactions, row level locking, and foreign keys for MySQL

InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables
http://www.innodb.com/order.php

Options: ReplyQuote


Subject Views Written By Posted
Can't open file ****.ibd (errno: 1) 9898 jchua 07/12/2005 05:02PM
Re: Can't open file ****.ibd (errno: 1) 3977 Marko Mäkelä 07/14/2005 05:09AM
Re: Can't open file ****.ibd (errno: 1) 3862 Americo Vanderlei 08/26/2005 11:07AM
Re: Can't open file ****.ibd (errno: 1) 4068 Maria Modeste 08/27/2005 11:48AM
Re: Can't open file ****.ibd (errno: 1) 3527 Marko Mäkelä 09/08/2005 12:42AM
Re: Can't open file ****.ibd (errno: 1) 4364 Michael Morrissey 10/18/2005 08:31PM
Re: Can't open file ****.ibd (errno: 1) 2949 Chris Bloom 10/19/2005 10:46AM
Re: Can't open file ****.ibd (errno: 1) 2767 Jos Juffermans 10/24/2005 01:42AM
Re: Can't open file ****.ibd (errno: 1) 3133 Christopher TruLove 11/04/2005 03:11AM
Re: Can't open file ****.ibd (errno: 1) 3250 Ionut Petre 10/19/2007 01:25AM
Re: Can't open file ****.ibd (errno: 1) 2998 Heikki Tuuri 10/19/2005 11:19AM
Re: Can't open file ****.ibd (errno: 1) 3045 Heikki Tuuri 10/25/2005 11:33AM
Re: Can't open file ****.ibd (errno: 1) 15830 Heikki Tuuri 11/04/2005 10:27AM
Re: Can't open file ****.ibd (errno: 1) 2689 vijay kadadi 02/02/2007 08:41AM
Re: Can't open file ****.ibd (errno: 1) 3162 anci wasim 01/08/2008 04:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.