While working with the databases, many times you may need to rename a database. For security purposes, MySQL had dropped the direct command to rename a database from MySQL 5.1.23. So there is no direct command to the T-SQL statement available for renaming a database in MySQL server.

You can follow one of the below instructions to rename a MySQL database with the help of cPanel, phpMyAdmin, or command line as per the availability. After renaming the database, remember that you need to reconfigure the permission on the new database for the users.

In this tutorial, you will find three methods to rename a MySQL database.

#mysql 

How to Rename MySQL Database
3.80 GEEK