Home  >  Article  >  Database  >  How to rename MySQL database

How to rename MySQL database

醉折花枝作酒筹
醉折花枝作酒筹forward
2021-05-21 09:22:0910825browse

This article will introduce to you how to rename a MySQL database. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How to rename MySQL database

# PS: It is best to back up the database in advance for the following operations, just in case, and it is better to be cautious.

We now have a database, the name of the database is testbase.

How to rename MySQL database

We now want to change it to newTestbase. Then we need to create a database named newTestbase.

How to rename MySQL database

Here comes the key point:

Right-click the data transfer on your previous database and you will see the following table:

How to rename MySQL database

Choose OK or Cancel as prompted:

How to rename MySQL database

Result:

How to rename MySQL database

At this time You have to press F5 to refresh and you will find that the contents of your new database are consistent with the contents of your old database, and the name of the database has been changed. If you do not need the old database, you can delete it.

Recommended learning: php video tutorial

The above is the detailed content of How to rename MySQL database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete