Skip to main content
This page covers day-to-day database management in cPanel — assigning user privileges, renaming databases, checking for errors, and cleaning up databases you no longer need. If you need to create a new database from scratch, see Create a MySQL database. For importing and exporting data, see Import and export MySQL databases.

Open the database manager

Log in to cPanel through your client area or at yourdomain.com/cpanel. Go to Databases > MySQL Databases (also called Manage My Databases in newer cPanel versions).

Manage user privileges

When you add a user to a database, you choose what that user can do. For most web applications, ALL PRIVILEGES is the right choice. If you need more control — for example, giving a user read-only access — select individual privileges instead.

Add a user to a database

1

Select the user and database

In the Add User To Database section, pick the user and database from the dropdown menus.
2

Click Add

The privilege selection screen appears.
3

Choose privileges

Select the checkboxes for the privileges you want to grant. Select ALL PRIVILEGES to grant full access. Click Make Changes.

Change a user’s privileges

In the Current Databases table, find the database and click the username listed under Privileged Users. This opens the same privilege screen where you can select or deselect individual privileges. Click Make Changes to save.

Remove a user from a database

In the Current Databases table, click the trash icon next to the user you want to remove, then click Revoke User Privileges from Database. This removes the user’s access to that database but doesn’t delete the user account.

Rename a database

1

Find the database

In the Current Databases table, click Rename next to the database.
2

Enter the new name

Type the new name and click Proceed.
Renaming a database disconnects all active connections to it. You’ll also need to update any configuration files (like wp-config.php) that reference the old database name. Back up the database before renaming it.
Behind the scenes, cPanel creates a new database, moves the data over, recreates grants and stored procedures, then deletes the old database. Larger databases take longer to rename.

Check a database for errors

If a site is behaving unexpectedly — queries failing, data not loading — a corrupted database table could be the cause. In the Modify Databases section, select the database from the Check Database dropdown and click Check Database. cPanel examines each table and reports whether it found problems. If it names a specific table, that table is corrupt and should be repaired.

Repair a database

In the Modify Databases section, select the database from the Repair Database dropdown and click Repair Database. cPanel attempts to fix any corrupt tables automatically. If the repair succeeds, you’ll see a “Repair Complete” message. If it fails, cPanel reports which tables couldn’t be repaired — in that case, restoring from a backup may be your best option.

Delete a database

In the Current Databases table, click Delete next to the database, then confirm by clicking Delete Database.
This permanently removes the database and all its data. Make sure you have a backup if you might need the data later.

Manage database users

The Current Users table at the bottom of the page lists all database users on your account. From here you can:
ActionHow
Change a user’s passwordClick Change Password, enter the new password, and confirm.
Rename a userClick Rename, enter the new username, and click Change Username.
Delete a userClick Delete, then confirm with Delete User.
Deleting a database user doesn’t delete the databases they had access to, and deleting a database doesn’t delete the users assigned to it. These are separate operations.
Don’t use phpMyAdmin to create databases or users. Databases created through phpMyAdmin aren’t tracked by cPanel, which causes problems with backups and account migrations.