0

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?

2
  • 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. Commented Jan 13, 2020 at 11:14
  • 1
    Does this answer your question? How do I quickly rename a MySQL database (change schema name)? Commented Jan 13, 2020 at 11:17

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.