Error 1016 using mysqldump on Windows

Author Message

Greg McAvoy-Jensen

Friday 27 July 2007 9:59:18 pm

I set up a laptop (Windows Vista) with the eZ Publish 3.9.2 Windows installer package (Mysql, PHP, Apache, eZ Publish) and used it for a bit of development work. I'm trying to move the site to a different machine using this technique (http://ez.no/ezpublish/documentation/configuration/backup_restore/move_to_new_provider), which has worked fine when I've moved from my Linux server. But on the Windows laptop, I get this error:

c:\eZpublish\mysql\bin>mysqldump --opt granite > dump_file.sql
mysqldump: Got error: 1016: Can't open file: 'ezapprove_items.ibd' (errno: 1) wh
en using LOCK TABLES

The Mysql log shows this:

070727 21:19:36  InnoDB error:
Cannot find table granite/ezapprove_items 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.
070727 21:19:36 [ERROR] MySQL: Can't open file: 'ezapprove_items.ibd' (errno: 1)

A web search shows one possibility is that I need to delete any .frm's which have no data in the InnoDB tables. But I'm not clear which .frm's have no data--nor am I sure this is the answer (won't this compromise my eZ Publish installation?).

Anyone know the correct way to handle this situation? Thanks!

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Heath

Saturday 28 July 2007 9:42:54 pm

Hello Greg!

I would backup all your work the best you know how to first. I would also backup your entire mysql installation, specifically directory where your database files are saved.

To test that you can restore this backup I would move these files asside, extract your backup and start your mysql server. With the backup confirmed functional for your needs I would then continue to seek a solution to this specific error.

Google has a number of related references, http://www.google.com/search?q=+Can%27t+open+file%3A+%27.ibd%27+&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a

And this one seems to be fairly specific on how to solve the problem,
http://forums.mysql.com/read.php?22,34050,52933

MySQL AB :: MySQL 5.0 Reference Manual :: 5.9.1 Database Backups
http://dev.mysql.com/doc/refman/5.0/en/backup.html

Reference which mentions briefly renaming the mysql dir as a way to backup the whole thing
http://www.analysisandsolutions.com/code/mybasic.htm#backup

I have not used that OS in some time so I can't speak with certainty but when every I need to mess with mysql storage files I backup the whole thing, which in the past has worked very well for me in similar situations. hth ...

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.