Home > Help Center > Shared Hosting > Databases > Manage MySQL Databases in CPanel

Manage MySQL Databases in CPanel

In this tutorial we'll show you how to create, manage, and delete MySQL databases and database users.

Go to Cpanel > Databases and click MySQL Databases link:

cpanel mysql databases

Create a database

We recommend that you use cPanel's MySQL Database Wizard interface to create your first database and user.

In the New Database text box, enter a name for the database and click Create Database button. The new database will appear in the Current Databases table:

cpanel mysql databases

cpanel mysql databases

Modify Databases

cpanel mysql databases

Check a database

If you experience problems with a database on your server, check your databases for errors.

In the Check Database menu, select the database that you wish to check and click Check Database.

A new interface will appear, and the system will check whether the database functions correctly. If the system detects a problem in the database, it displays the name of the corrupt table.

If the Check Complete message displays, the database functions correctly.

cpanel mysql databases

Repair a database

If one of your databases is corrupt, you can attempt to repair it.

In the Repair Database menu, select the database that you wish to repair and click Repair Database.

The system will attempt to automatically repair the database. If the system cannot repair the database, it will attempt to determine the source of the corrupt data.

If the Repair Complete message displays, the system successfully repaired the database:

cpanel mysql databases

Current Databases

The Current Databases table lists the following information for each database in your account:

Database - The name of the database. Size - The size of the database. Privileged Users - The users who can manipulate the database.

To remove a user from a database, click the trashcan icon for the desired user, and then click Revoke User Privileges from Database.

To modify a user's privileges for a specific database, click the desired username, select and deselect checkboxes to configure the desired privileges, and then click Make Changes.

Rename a database

Create a backup of the MySQL database before you attempt to rename it.

Manually update configuration files and applications to use the new database name.

In the Current Databases table, click Rename for the desired database.

Enter the new database name in the New name text box and click Proceed:

cpanel mysql databases

MySQL does not allow to rename a database. Actually CPanel will create a new database and will move the data in the new database. Then the old database gets deleted.

Delete a database

In the Current Databases table, click Delete for the desired database.

To permanently delete the database, click Delete Database.

cpanel mysql databases

Add a MySQL user

After you create a database, add users to the database and configure their privileges:

cpanel mysql databases

Enter a username in the Username text box. Enter and confirm the new password in the appropriate text boxes. Click Create User.

Add a user to a database

In the Add User To Database section of the interface, select the desired user and database from the menus. Click Add:

cpanel mysql databases

The MySQL Account Maintenance interface will appear:

cpanel mysql databases

Select the checkboxes that correspond to the privileges that you wish to grant to the user.

To grant all of the available privileges to the user, select the ALL PRIVILEGES checkbox.

Click Make Changes.

Current Users

The Current Users table lists all of your MySQL database users, and allows you to perform the following actions:

cpanel mysql databases

Change Password - click to modify a database user's password. Enter and confirm the desired password, and then click Change Password.

cpanel mysql databases

Rename - click to rename a database user. Enter the desired username, and then click Change Username:

cpanel mysql databases

Delete - Click to permanently delete a database user, and then click Delete User to continue:

cpanel mysql databases


MySQL is an indispensable part of almost all modern websites and CMS systems, and the intelligent management of MySQL databases is no longer an option but a necessity.

#cpanel #apps

Still not finding what you're looking for?

Contact our support team with any additional questions or concerns.

Contact support