HostMonster Web Hosting Help

How to rename a database in phpMyAdmin

The latest version of phpMyAdmin allows you to change the name of the database.

Keep in mind that when you change the name of a database, you will have to reconfigure user permissions and any scripts that you want to continue referencing this database.

Before You Begin

For cPanel: If you want the same database user to have access to the renamed database, you should take note of the username already assigned to the database, which may or may not be similar to the name of the current database.

  1. In cPanel, click on MySQL Databases.
  2. Scroll down to the Current Databases section of the page.
  3. Find the database you are about to rename, and take note or remember the database user already assigned to the database.  You will need to know this for step 2.
  4. You can return to the cPanel home screen to begin Step 1.

Step 1: Renaming the Database

  1. From cPanel, click on phpMyAdmin. (It should open in a new tab.)
  2. Click on the database you wish to rename in the left hand column.
  3. Click on the Operations tab.
  4. Where it says "Rename database to:" enter the new database name.
  5. Click the Go button.
  6. When it asks you to want to create the new database and drop the old database, click OK to proceed. (This is a good time to make sure you spelled the new name correctly.)
  7. Once the operation is complete, click OK when asked if you want to reload the database.

Step 2: Reconfiguring User Permissions

If your hosting plan has cPanel, then you will need to reconfigure user permissions.

  1. Go back to the main cPanel page.
  2. Click on MySQL Databases.
  3. Scroll down to the Add User To Database section of the page.
  4. Select the database from the list (should be the new name).
  5. Select the database user from the list (the same one that used to be associated with this database).
  6. Click on Add button.
  7. On the Manage User Privileges page that appears, check the box next to All Privileges.
  8. Click on the Make Changes button.

Step 3: Update Scripts

You may need to update any scripts or applications that reference this database, since the name has changed, if you want them to continue to have access to this database.

Knowledgebase Article 34,700 views bookmark tags: cpanel databases mysql phpmyadmin (updated 861 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

Instructions on deleting tables from your database using phpMyAdmin (updated 861 days ago)
Knowledgebase Article 36,004 views tags: Plesk cpanel databases mysql phpmyadmin

A tutorial on how to perminately delete columns from your mySQL database using phpMyAdmin (updated 859 days ago)
Knowledgebase Article 36,364 views tags: Plesk cpanel databases mysql phpmyadmin

Step by step directions on how you can search your database using phpMyAdmin (updated 861 days ago)
Knowledgebase Article 12,345 views tags: Plesk cpanel databases mysql phpmyadmin

Related Help Content

A guide on renaming the tables inside of your database using phpMyAdmin (updated 44 days ago)
Knowledgebase Article 14,023 views tags: databases mysql phpmyadmin

A repository of information on how you can manage your database by using the phpMyAdmin interface. (updated 861 days ago)
Knowledgebase Article 146,548 views tags: commands database mysql phpmyadmin

A guide to duplicating a MySQL database using phpMyAdmin (updated 861 days ago)
Knowledgebase Article 29,599 views tags: databases mysql phpmyadmin

How do I import a backup of my database (.sql file) using phpMyAdmin? (updated 28 days ago)
Knowledgebase Article 139,332 views tags: database mysql phpmyadmin

Instructions on adding a column to your database in phpMyAdmin (updated 850 days ago)
Knowledgebase Article 66,188 views tags: databases mysql phpmyadmin

This article will walk you through the steps to copying and renaming a database with phpMyAdmin. (updated 28 days ago)
Knowledgebase Article 16,343 views tags: database phpmyadmin

A step by step guide on how to manipulate data in your mySQL tables using phpMyAdmin (updated 861 days ago)
Knowledgebase Article 41,239 views tags: databases mysql phpmyadmin

This article will explain MySQL database and user creation and deletion, and explain how to assign a user to a database. (updated 86 days ago)
Knowledgebase Article 457,953 views tags: creation database mysql