MySQL Forums
Forum List  »  Newbie

Single database restores from a global database backup?
Posted by: Greg
Date: September 08, 2004 07:29PM

Hi all,

I'm sure there is going to be a stupidly simple answer to this, but I've been searching for hours now and I just can't seem to find the answer.

If I create a backup using mysqldump -u admin -p password -all mybackup.sql, how can I do a restore from that file on a single database?

Every example if find appears to deal with single database backups.. i.e.

mysql -u admin -p passwd < mybackup.sql

Which would work find if I wanted to do a *complete* restore of every database.

But I only want to restore a *single* database from the backup?

I tried:

mysql -u admin -p passwd -D mydb < mybackup.sql

But I keep getting messages about tables already existing which says to me its attempting to overwrite other databases?

I know this should be simple to do, but I'm stumped.

Any help would be *greatly* appreciated.

Best regards,

Greg.

Options: ReplyQuote


Subject
Written By
Posted
Single database restores from a global database backup?
September 08, 2004 07:29PM


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.