How to delete a database in cPanel?


Managing your website's resources efficiently is crucial for maintaining performance and security. Over time, you might accumulate databases that are no longer in use – perhaps from old websites, testing environments, or abandoned projects. Deleting these unnecessary databases helps keep your cPanel account tidy and secure.

This guide will walk you through the straightforward process of safely deleting a MySQL database in cPanel. It's important to ensure you no longer need the database before proceeding, as this action is irreversible.


What You'll Need:

Before you begin, make sure you have the following:

  • Access to your cPanel account via your EncodeDotHost customer portal.
  • The exact name of the database you wish to delete.
  • Confirmation that the database is no longer needed by any active website or application.

Step 1: Access MySQL Databases in cPanel

Your first step is to navigate to the database management section of your cPanel.

  1. Log in to your cPanel account.
  2. In the "Databases" section, click on the "MySQL Databases" icon. This icon typically looks like a database cylinder.
    MySQL Databases icon in cPanel

Step 2: Locate and Delete the Database

On the "MySQL Databases" page, you'll find a list of all your existing databases.

  1. Under the "Current Databases" section, you'll see a list of all your databases. Locate the database you wish to remove.
  2. Click on the "Delete" icon (often represented by a red 'X' or a trash can) next to the database name.
    Delete Database icon
  3. You will be taken to a confirmation page. Click on the "Delete Database" button to confirm the deletion.
    Database removal confirmation
  4. You will receive a success message confirming the database has been deleted. Click "Go Back".

Step 3: (Optional) Delete Associated Database Users

If the database had a dedicated user that is no longer needed for any other database, it's good practice to delete that user as well for security and tidiness.

  1. On the same "MySQL Databases" page, scroll down to the "Current Users" section.
  2. Locate the database user that was associated with the database you just deleted.
  3. Click the "Delete" icon next to the user's name.
  4. Confirm the deletion on the next page.

Important Considerations:

  • Irreversible Action: Deleting a database is permanent. Always ensure you have a backup or are absolutely certain the database is no longer required before proceeding.
  • Associated Users: Deleting a database does NOT automatically delete the database user(s) associated with it. You should manually remove users if they are no longer needed for any other database.
  • Website Impact: If the database is still being used by an active website, deleting it will cause that website to stop functioning.

Troubleshooting Tips:

  • Database not appearing in list: Ensure you are looking under "Current Databases" and that it hasn't already been deleted.
  • "Error deleting database": This can sometimes happen if the database is still being actively accessed. Try again after a few minutes, or contact support if the issue persists.
  • Still having trouble? Contact EncodeDotHost support with details of the issue and any error messages you're receiving, and they'll be happy to assist further.

By regularly managing your databases, you contribute to a more secure and efficient hosting environment for your website.


Was this answer helpful?

One email a month. Endless business benefits.

Don't miss out on WMTWWFY — the newsletter that keeps your website fast, safe, and visible.

« Back
Spinner
aluminium-anthropoid Security Check