Unfortunately and probably for good reason the RENAME DATABASE command had a short life in Mysql for safety precaution reasons.

After doing some research, it appears that the best approach is as follows as it works well for both MyISAM and InnoDB table types:

  1. Create new database

  2. Perform RENAME TABLE command that includes the table and database from the old one to the newly created database

  3. Repeat once for each table


In all of the examples I didn't find an automated script time to make one I thought!