Last updated: 5 April 2021

You can manage existing databases via the MySQL Databases page. You can use this page for the following actions:

  • Repair a database
  • Delete or rename a database
  • Create, delete or rename a database user
  • Link a user to a database (and select the user’s privileges)

It is also possible to create a new database via the MySQL Databases page. However, for most users it easier to create a new database via the MySQL Database Wizard.

Repair a database

When your website suddenly encounters errors it is worth checking if one or more database tables have crashed. You can do so via the Modify Databases section:

  • If you got more than one database, select the database you want to check.
  • Click or tap the Check Database button.

Checking if the 'example_recipes database needs to be repaired.
Image: you can check if any databases tables need repairing via the ‘Check Database’ option.

When you check a database cPanel runs a CHECK TABLE query on every table in the database. If cPanel reports that one or more tables have been corrupted then you can next click on Repair Database to try to fix the issue.


Note: Repairing tables almost always works fine but there is a small change that the database ends up in an even worse state. We therefore recommend to always make a backup of the database before you attempt to repair it.

It is also worth mentioning that you can only check and repair database tables that use the MyISAM storage engine. By default all tables use MyISAM but if you changed one or more tables to InnoDB then the check and repair functions won’t work on those tables. Please submit a ticket if you need any help with corrected tables.


Renaming and deleting database

The Current Databases section lists existing databases. You can see the size of your databases, and for each database you got the option to rename or delete the database:

  • Renaming a database is rarely necessary and a potentially risky operation. We recommend making a backup of the database before you rename the database.
  • Deleting a database permanently deletes the database and all the data stored in it. Again, you probably want to make a backup before you purge a database.

The list with current database on cPanel's 'MySQL Databases' page.
Image: the current databases, with options to rename or delete an individual database.

The list with current databases also shows a link to the user(s) for each database. You can quickly change a user’s privileges by clicking on the user’s name. Clicking on the rubbish bin icon removes all the user’s privileges.

Adding a new user

You can create a new user via the Add New User form. We saw the same form in the Create a database article. You can simply choose a name for the user; enter (or generate) a password and hit the Create User button.

The 'Add New User' form is used to create a new database user.
Image: creating a new user named example_admin.

Note that the new user is not be linked to any database. To add the user to a database you need to use the Add User To Database form, which we will look at now.

Adding a user to a database

The Add User To Database form lists all existing users and databases. To add the user we just created (example_admin) to the example_recipes database we simple select the user from the User drop-down list and the database from the Database list.

Adding the user 'example_admin' to the 'example_recipes' database.
Image: Linking the example_admin user to the example_recipes database.

Managing current database users

Finally, we can manage existing databases users in the Current Users section. For each user you got three possible actions:

  • Change the user’s password
  • Rename the user
  • Delete the user

The list with current database users.
Image: the current database users.

Always use the control panel to manage databases and users

You may be wondering if you can manage databases and database users via phpMyAdmin. The answer is ‘no’. Queries such as   CREATE USER and DROP USER will fail with an “insufficient privileges” error. This is because changes you make outside the MySQL Databases interface don’t propagate to cPanel, which would leave your database in an inconsistent state.