MySQL Forums
Forum List  »  Data Recovery

Re: Need to restore data from dump on diff machine without access to original
Posted by: Ilyse Kazar
Date: July 23, 2008 06:53PM

Hi Oleg --

I'm a mysql newbie too, but I did just finish getting a handle on how to do exactly what you're attempting.

1. On the new server, create the database and assign an admin user & password. You do not need to create any tables, columns, indexes or anything. Just make a new database.

2. Put the .sql file into the same directory as your database and navigate there from a command prompt.

3. type in:
mysql -u #username# -p #database# < #dump_file#

replace "#username#" with the user you set up, replace "#database#" with the database name, and replace "#dump_file#" with the name of the .sql file (include the .sql extension)


I have gotten that far. I find I am running into Error 1062 and errors will be reported right there in the command-prompt window. But the instructions above do work ... apparently in my version of mysql this bug reports duplicate key value errors when it should not report them ... darn.

But you may not run into this same problem; it is likely the above instructions will get your task accomplished.

kazar

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Need to restore data from dump on diff machine without access to original
3566
July 23, 2008 06:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.