cPanel provides tools to create, manage, and delete MySQL databases and users. You can also assign privileges, repair databases, and revoke access when needed.
Managing Database Users
1. Creating a Database User
-
Log in to cPanel.
-
Go to Databases → MySQL Databases (or Manage My Databases in newer versions).
-
Under Add New User:
-
Enter a username.
-
Enter and confirm a password (or use the Password Generator).
-
-
Click Create User.
2. Changing a User’s Password
-
In MySQL Databases, under Current Users, locate the user.
-
Click Change Password.
-
Enter the new password → Change Password.
3. Renaming a User
-
In Current Users, locate the user.
-
Click Rename.
-
Enter the new name → Proceed.
4. Deleting a User
-
In Current Users, locate the user.
-
Click Delete → confirm. Deleting a user also removes all their database permissions.
Managing Databases
1. Creating a Database
-
In MySQL Databases, under Create New Database, enter a name.
-
Click Create Database. Note: cPanel prefixes your account username to the database name (e.g.,
user_dbname).
2. Adding a User to a Database
-
In MySQL Databases, under Add User to Database:
-
Select the user.
-
Select the database.
-
-
Click Add.
-
Assign privileges (or select ALL PRIVILEGES) → Make Changes.
3. Checking and Repairing a Database
-
In MySQL Databases, under Modify Databases:
-
Select the database from Check Database → Check Database.
-
If errors are found, select it under Repair Database → Repair Database.
-
4. Revoking User Privileges
-
In Current Databases, locate the user attached to a database.
-
Click the trash can icon → Revoke User Privileges from Database.
5. Deleting a Database
-
In Current Databases, locate the database.
-
Click Delete → confirm. Note: Deleting a database does not delete its users, but it revokes their privileges.