I created a database with the name of old. Now I need to change database name to new. But,I did not know how to change a name?
Asked
Active
Viewed 123 times
0
-
You cannot rename database - its name is relative to directory name where its files are stored. Backup and restore with new name is the only option. – Akina Jan 13 '20 at 11:14
-
1Does this answer your question? [How do I quickly rename a MySQL database (change schema name)?](https://stackoverflow.com/questions/67093/how-do-i-quickly-rename-a-mysql-database-change-schema-name) – rai Jan 13 '20 at 11:17
1 Answers
0
I believe that the ability to rename a database has been removed from the spec for security reasons. What you will need to do is create a full dump of the database "old". Then you'll need to create a new database and re-import the data

Richard Price
- 482
- 4
- 13