Knowledgebase Home / How to rename a database in phpMyAdmin

How to rename a database in phpMyAdmin


In this article, we will show you how to rename a database via phpMyAdmin.

phpMyAdmin is a free and opensource application for MySQL database management. It is one of the most popular web-based MySQL management tools for web hosting services.  Written in PHP, phpMyAdmin gives users the ability to interact with their MySQL databases.

Quick Steps

  1. Go to cPanel > Databases > phpMyAdmin
  2. Select database you wish to rename from the left hand column.
  3. Click on the Operations tab.
  4. Under the field “Rename database to:” enter the new database name.
  5. Click the Go button.
  6. Click OK to proceed
  7. Once the operation is complete, click OK when asked if you want to reload the database.

Note : Keep in mind that when you change the name of a database, you will have to reconfigure user permissions to continue referencing this database.

Renaming the Database

Go to cPanel > Databases and click on phpMyAdmin.

Renaming the Database

cPanel main page.

phpMyAdmin will open in a new tab. Select the database you wish to rename from the left hand column and then click on Operations.

phpMyAdmin Operations

Select a database in phpMyAdmin.

Enter the new database name in the field “Rename database to:” and click Go. 

Renaming the database

Renaming the database.

Click OK to proceed when it asks if you to want to create the new database and drop the old database.

create the new database and drop the old database

Rename the database in phpMyAdmin.

That’s it! The database has been renamed to “test” as shown below, 

PHPMyAdmin Structure

Databases list in phpMyAdmin.

Re-configuring User Permissions.

We’ll need to reconfigure the user permissions, since the database has been renamed. Go back to the main cPanel page and click on MySQL Databases.

Scroll down to the Add User To Database section of the page. From the list, select the renamed database and the database user that used to be associated with this database. Then, click on the Add button. 

Add User to Database

Reconfigure permissions for the database user in cPanel.

On the Manage User Privileges page, check the box next to All Privileges  and click on the Make Changes button.

Manage User Privileges

Managing user privileges in cPanel for MySQL databases.

Conclusion

The database should now have the new name. You may also need to update all the scripts or applications to continue accessing the renamed database.

How useful was this post?

Click on a star to rate it!

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!


If the steps above listed in this article do not resolve your issue, please feel free to open a support ticket and we’d be happy to take a look.

Looking for better web hosting? Sign up today and take 50% off your first month with promo code: 1stmonth50

Our Guiding Principles

  • Provide consistent, stable and reliable web hosting services.
  • Ensure rapid ticket response and quick resolutions to issues.
  • Never saturate or over-provision servers to ensure stability and speed for our customers.
  • Use only high quality enterprise-class hardware to ensure minimal downtime from hardware failures.
  • Provide clear pricing with no hidden fees or gotchas.