Solved

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

Posted on 2004-10-04
6
405 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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)

Join & Write a Comment

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

19 Experts available now in Live!

Get 1:1 Help Now