Last Updated: February 25, 2016
·
214
· Andrew Stilliard

Quick rename mysql database

# create the new db
mysqladmin create NEW_NAME
# dump out the old db into new db
mysqldump OLD_NAME | mysql NEW_NAME
# ...check the new one is ok...
# drop the old db
mysqladmin drop OLD_NAME