Solved

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

Posted on 2004-10-04
6
414 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
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
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 …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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