Solved

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

Posted on 2004-10-04
6
409 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now