How do I quickly rename a MySQL database (change schema name)?


The MySQL manual at MySQL covers this.

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.

This needs to work with InnoDB, which stores things very differently than MyISAM

aktananil 3 months 0 Answers 111 views 0

Leave an answer


Captcha Click on image to update the captcha .