GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

can't open .ibd file error

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • can't open .ibd file error

    Hi,

    I'm using InnoDB type tables and I've run into a problem after recently stopping/starting the mysql server. Here are the logs:

    070130 3:34:39 [Note] /usr/libexec/mysqld: Normal shutdown
    070130 3:34:39 InnoDB: Starting shutdown...
    070130 3:34:42 InnoDB: Shutdown completed; log sequence number 0 7907923
    070130 3:34:42 [Note] /usr/libexec/mysqld: Shutdown complete
    070130 03:34:42 mysqld ended
    070130 03:35:51 mysqld started
    InnoDB: The first specified data file ./ibdata1 did not exist:
    InnoDB: a new database to be created!
    070130 3:35:51 InnoDB: Setting file ./ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait...
    070130 3:35:52 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile0 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    070130 3:35:52 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile1 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    InnoDB: Doublewrite buffer not found: creating new
    InnoDB: Doublewrite buffer created
    InnoDB: Creating foreign key constraint system tables
    InnoDB: Foreign key constraint system tables created
    070130 3:35:52 InnoDB: Started; log sequence number 0 0
    /usr/libexec/mysqld: ready for connections.

    And then after starting the server, everytime I try to do a select statement, I get the following errors:

    070130 3:36:01 [ERROR] /usr/libexec/mysqld: Can't open file:
    'EXAMPLE.ibd' (errno: 1)
    070130 3:36:01 InnoDB error:
    Cannot find table test/EXAMPLE from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database?
    Look from section 15.1 of http://www.innodb.com/ibman.html
    how you can resolve the problem.

    Has anyone ever seen this situation before? Why would mysql think the ibdata1 and log files are missing after shutting down mysql safely? Upon doing selects, why does mysql look for .ibd files when all the tables should be in the ibdata1 file?

    Please help... I've done a lot of research online and can't seem to figure out what's going on. Please tell me I can recover my data? If not, maybe someone knows why this would even happen in the first place? Thanks!

  • #2
    Hello,

    According this message:
    "
    070130 03:35:51 mysqld started
    InnoDB: The first specified data file ./ibdata1 did not exist:
    InnoDB: a new database to be created!
    070130 3:35:51 InnoDB: Setting file ./ibdata1 size to 10 MB
    "

    MySQL wasn't able to find ibdata1 file and created a new one. To recover your data you need to find your 'old' ibdata1 file. Check also that datadir and/or innodb_data_home_dir are set correctly.

    Comment

    Working...
    X