By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,534 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,534 IT Pros & Developers. It's quick & easy.

Restoring / copying / moving database

P: n/a
I am trying to move a datbase from one machine to another. I have
tried two different methods and neither are working.

First I tried using :
mysqldump dbName > backup_file.sql
mysql dbName < backup_file.sql
as the manual outlines, but I have a number of foreign keys resulting
in errno=150 because the second command above is trying to restore
data which is supposed to be linked to data in other tables that don't
exist until that table is reached.

So then I tried :
mysqldump --disable-keys dbName > backup_file.sql
mysql dbName < backup_file.sql

But that did not work either. The most obvious choice at this point is
to create a script to restore the tables in the proper order, but this
seems kind of tedious and a maintenance headache if tables are added /
changed in the future.

Next, I tried to simply copy the entire folder for the database. This
folder contains *.frm files only (we have created all InnoDB tables).
I created the database first then copied the files over to the
appropriate folder. When I try to look at the table using the MySQL
Control Center I get the error "Error 1016 : Can't open file
'filename.InnoDB' (errno : 1)"

I even moved the entire mysql installation folder, but received the
same error???

Any help would be appreciated.
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.