How do I remove a MySQL database?

Léo Léopold Hertz 준영 picture Léo Léopold Hertz 준영 · Jul 4, 2009 · Viewed 389.2k times · Source

You may notice from my last question that a problem caused some more problems, Reading MySQL manuals in MySQL monitor?

My database is now unusable partly due to my interest to break things and my inability to look at error messages. I know that I should not reuse primary keys, but I would like to use them again after the removal of the database that I deteriorated. So

How can I correctly remove a MySQL database?

Answer

rnicholson picture rnicholson · Jul 4, 2009

From the MySQL prompt:

mysql> drop database <db_name>;