Bug #50260 Database rename during restore should be possible
Submitted: 12 Jan 2010 2:50 Modified: 12 Jan 2010 4:28
Reporter: Hema Sridharan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[12 Jan 2010 2:50] Hema Sridharan
Description:
MySQL Backup Feature has ability to backup database to file like,
Backup Database db1 to '/tmp/db1.bak';

Now while performing restore, user should be able to rename the database 
For example 
Restore from '/tmp/db' to database 'xy', where xy is new name for database db1. 

This will help user to maintain multiple copies of the same database. 

How to repeat:
This is a feature request and is not currently implemented.
[12 Jan 2010 4:28] Valeriy Kravchuk
Thank you for the feature request.
[20 Sep 2012 9:19] Andrew McNaughton
+1.  

Recovery from a dump file can take a long time, and tables are dropped while this occurs.  Given a website that has a problem that requires going back to a backup, but is still largely functional, I'd like to be able to recover the backup content into a new database, and then switch it in once loaded.

That requires two things.  Loading into a new database isn't so hard.  The dumpfile is editable.  switching the new database to the name of the old one though doesn't seem to be possible.