Restore to new name

I have a backup of a database, called ‘myDataBase’, and would like to restore it on the same server but under a different schema name. In other words after a restore I would like to have the original schema ‘myDataBase’ existing next to ‘myDataBase_copy’ and they are identical in everything but name. How can I do this?

Many Thanks


Hi Mike,

You can not directly do that but if you have innodb_file_per_table ON then you can use option like Import/Export tablespace option to restore tables in new database name from the backup.

Even, MySQL 5.6 supporting exportable tablespaces.