Solved

Can't open file: '????.innodb' (errno: 1)

Posted on 2004-10-04
6
424 Views
Last Modified: 2008-02-01
A while ago I took a copy of a MySQL database directory thinking (wrongly!) that I was taking a snapshot fo the database

Now when I try to access it I get the above error

I now realise that one has to copy the Innodb repository too but I didn't

Is there any way I can get this database working again?  Can I manually edit the repository or is there a command to rebuild the repository from the database files?

THanks
0
Comment
Question by:Paul197466
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 33

Accepted Solution

by:
snoyes_jw earned 250 total points
ID: 12219683
Looks like your error matches the second one listed at
http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html

Try the recommendation there.
0
 
LVL 26

Assisted Solution

by:ushastry
ushastry earned 250 total points
ID: 12223660

Try this..
(BACKUP DB BEFORE DOING ANYTHING HERE)



the problem is: InnoDB-tables can't by simply copied by copying the files in the database-folder. they are stored
on 2 places. the first place is the database-folder, the second place is the innodb-repository, defined in
my.ini/my.cfg with innodb_data_home_dir =...

1. copy all databasese from one server to another (with innodb)
so if you want to copy all the databases from one server(with innodb) to another server(with innodb), copy
all the database-folders, as you did with MyIsam and copy the innodb-repository defined
in my.ini/innodb_data_home_dir. don't forget to setup the innodb-stuff in my.ini of the destination server
as defined in the source-server.

2. copy one database from one server to another (with innodb)
if you only want to copy 1 innodb-database, the best way is to do it with mysqldump,
to export it:

mysqldump -u your_user -pyour_password --opt your_database > output_file.sql

now move this file to the destination server and type:

mysql -u your_user -pyour_password < output_file.sql




Taken from
http://www.experts-exchange.com/Databases/Mysql/Q_20753732.html
0
 

Author Comment

by:Paul197466
ID: 12224623
Thanks, but the first solution assumes an intact Innodb repository and an orphaned .frm file, whilst I have no Innodb repository info for the copied databse and just the orphaned .frm file

The second is a solution on how to do it properly, rather than fixing the problem I have!
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Expert Comment

by:ceciliamtz
ID: 13656268
Paul, I am in the same situation you were some time ago. Did you find a solution to recover your data?

Thanks

Cecilia Mtz
0
 

Author Comment

by:Paul197466
ID: 13656285
Hi,

Honest answer is I can't remember but I don't tink I did - I had to restore a backup
0
 

Expert Comment

by:ceciliamtz
ID: 13656400
Thanks for your answer, I am afraid I'll have to do the same thing.

Thanks again
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question