Last updated: 5 April 2021
You can manage existing databases via the MySQL Databases page. You can use this page for the following actions:
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.
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:
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.
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:
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.
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.
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.
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.
Image: Linking the example_admin user to the example_recipes database.
Finally, we can manage existing databases users in the Current Users section. For each user you got three possible actions:
Image: the current database 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.