469,648 Members | 1,431 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Restoring / copying / moving database

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
0 950

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Terry | last post: by
2 posts views Thread by Yair Sageev | last post: by
6 posts views Thread by Edwinah63 | last post: by
1 post views Thread by Jani Tamminen | last post: by
9 posts views Thread by db2inst2 | last post: by
5 posts views Thread by Mike Nolan | last post: by
4 posts views Thread by Együd Csaba | last post: by
1 post views Thread by Robbert van Geldrop | last post: by
5 posts views Thread by Troels Arvin | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.