How do I quickly rename a mysql database (change schema name)?
Posted
by deadprogrammer
on Stack Overflow
See other posts from Stack Overflow
or by deadprogrammer
Published on 2008-09-15T21:22:00Z
Indexed on
2010/04/18
9:53 UTC
Read the original article
Hit count: 245
mysql
Usually I just dump the database and reimport it with a new name. This is not an option for very big databases. Apparently RENAME {DATABASE | SCHEMA} db_name TO new_db_name; does bad things, exist only in a handful of versions, and is a bad idea overall.
Oh, one more thing - this needs to work with InnoDB, which stores things very differently than MyISAM.
© Stack Overflow or respective owner