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.

eZ debug

Timing: Jan 19 2025 08:56:39
Script start
Timing: Jan 19 2025 08:56:39
Module start 'layout'
Timing: Jan 19 2025 08:56:39
Module start 'content'
Timing: Jan 19 2025 08:56:39
Module end 'content'
Timing: Jan 19 2025 08:56:39
Script end

Main resources:

Total runtime0.0194 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.2813152.6406
Module start 'layout' 0.00630.0031 741.921939.4922
Module start 'content' 0.00940.0079 781.414193.4922
Module end 'content' 0.01730.0021 874.906334.3047
Script end 0.0194  909.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002513.1151140.0002
Check MTime0.00115.8768140.0001
Mysql Total
Database connection0.00063.105710.0006
Mysqli_queries0.002512.944230.0008
Looping result0.00000.072610.0000
Template Total0.00158.010.0015
Template load0.00094.720610.0009
Template processing0.00063.039210.0006
Override
Cache load0.00073.533710.0007
General
dbfile0.002914.846980.0004
String conversion0.00000.045540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs