How to delete a database without breaking a site
Three checks before you delete a database, because there is nothing to undo it with afterwards.
Export the database first, confirm nothing live still connects to it, then delete it through the databases section of your control panel. That order matters, because a deleted database cannot be recovered from within your account once it is gone — there is no recycle bin for it.
Unlike deleting a file, which can sometimes be recovered, deleting a database removes every table and every row it contained straight away. The only way back is a backup made before the deletion.
Step 1: back it up, even if you are sure you do not need it
Export the database before doing anything else. See exporting a database — it takes a couple of minutes through phpMyAdmin and costs nothing to keep around for a while. "I was certain I did not need it" is a common enough regret that the export step is worth treating as non-optional, even for a database you are confident is genuinely unused.
Step 2: confirm nothing live still uses it
Check the configuration of every application on the account — not just the one you think uses this database. It is easy to forget a staging copy, a second application sharing the same database, or a script that only runs occasionally, such as a scheduled report or an import job, none of which would show an obvious problem until the next time they run after the database is gone.
If you are not certain, a safer middle step is to rename the database's user password to something the application no longer has, rather than deleting the database outright, and watch for a few days to see if anything breaks. A password change is reversible; deletion is not.
Step 3: delete it through the control panel
Once you are confident, remove the database from the databases section of your control panel. This also typically detaches any users that were only attached to that database — check whether those users are still needed elsewhere, or remove them too if they served no other purpose.
What if something breaks afterwards?
If a site goes down or starts showing a database error right after you delete a database, that database was still in use. Restore your export into a newly created database with the same name, reattach the same user, and the application will typically start working again exactly as before — see creating a MySQL database and user and, if you need help identifying which piece failed, fixing a database connection error.
Related reading
Turn a live database into a single portable SQL file, ready to back up, move, or hand to a developer.
How to create a MySQL database and userEvery application needs a database, a user, and that user attached to the database — here is the order to do it in.
How to fix "Error establishing a database connection"A blank page with one line of text, and five possible causes. Here is how to tell which one you have, in the order worth checking.
How many databases can I create?It depends on your plan, and the number is shown in your control panel rather than fixed across every account.