Rename MySQL Database
No sql command to do it!
Rename command will include in MySQL 5.1.7 or above!
It is easy feature, Why waiting till 5.1.7?
Don't worry. I have 2 solutions.
1. Rename database folder.
Haha it easy! Just shutdown MySQL then renames it. This way need shutdown, it not good for production server. So what’s next solution?
Dump whole database to new one. Use below command
$ mysqladmin create new_db
$ mysqldump --opt old_db | mysql new_db
*
So basic but why MySQL miss it!!??
Comments