Would you like to learn how to rename a database on MySQL? In this tutorial, we are going to show you how to use the MySQL command-line to rename a database.
• Ubuntu 20.04
• Ubuntu 19.04
• Ubuntu 18.04
• MySQL 8.0.19
MySQL Related Tutorial:
On this page, we offer quick access to a list of tutorials related to MySQL.
Tutorial MySQL – Rename a database
Access the MySQL command-line.
Verify the list of databases.
Here is the command output:
In our example, a user account named AAA01 has permission over the database named MYDATABASE.
On the Linux command-line, backup the MySQL database.
Access the MySQL command-line.
Create a new database using the desired name.
Configure the same user permission on the new database.
On the Linux command-line, restore the MySQL database backup.
In our example, we rename a MySQL database named MYDATABASE to NEWDATABASE.
Delete the original MySQL database.
Congratulations! You are able to rename a MySQL database.