Please follow below steps to rename a database in cPanel.
Step-1: Login to your cPanel account and search database and select MySQL Databases.
Step-2: Under “Current Databases” You will see the list of your all databases in cPanel. Search and Select the Database you want to rename and then click on the “Rename” button.
Step-3: Enter a new database name and then click on the “Proceed” button.
Step-4: Verify that database name has been changed and you are done.