[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-10-04
6
Medium Priority
?
443 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 500 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:Umesh
Umesh earned 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

649 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