WHM allows server administrators to manage and delete MySQL® or MariaDB® databases for any cPanel account on the server. Deleting a database permanently removes the database and all of its data. This action cannot be undone, so always back up any important data before proceeding.
Step 1: Log in to WHM
Open your browser and navigate to https://your-server-ip:2087. Enter your root credentials to access the WHM dashboard.
Step 2: Navigate to MySQL Databases
In the left-hand sidebar, go to Home » SQL Services » MySQL Databases. This interface lists all MySQL databases on the server along with their associated cPanel accounts.
Step 3: Locate the Database
Browse the list of databases or use the search box to find the specific database you want to delete. You can filter by cPanel username or database name.
Step 4: Delete the Database
Find the database in the list and click Delete next to it. Confirm the deletion when prompted.
Step 5: Verify Deletion
After deletion, the database should no longer appear in the list. You can also verify by logging into the cPanel account and checking the MySQL Databases interface there.
Alternative: Delete via cPanel
You can also delete a database by logging into the specific cPanel account and navigating to cPanel » Home » Databases » MySQL Databases, then clicking Delete next to the database under the Current Databases section.
Important Notes
- This action is permanent. Deleting a database removes all tables, data, and associated database users. Always create a backup first.
- Deleting a database does not automatically delete the database users associated with it. You should manually remove orphaned database users.
- If database prefixing is enabled (via Tweak Settings » SQL), database names will include the cPanel username prefix followed by an underscore (e.g.,
username_dbname). - This requires root-level WHM access. Resellers with appropriate permissions may also be able to manage databases for their accounts.
Troubleshooting
- Database not listed: Ensure the database exists and is not already deleted. Check via command line:
mysql -e "SHOW DATABASES;" - Delete button is greyed out or missing: Verify you have sufficient WHM privileges. Resellers may have restricted database management permissions.
- “Access denied” error: Ensure the MySQL/MariaDB service is running. Check its status in WHM » Home » Service Status or restart it via WHM » Home » Restart Services » SQL Server (MySQL).