How to drop a database with MySQLHow to drop a database with MySQL

Posted September 9th, 2009 in MySql

This post shows the SQL query used to drop a database with MySQL and also a couple of screenshots showing the same process using phpMyAdmin.

SQL Query

If the database to be dropped is called "test", run the following query to delete the entire database. This is irrecoverable and there is no prompting to see if you really do want to drop the database.

DROP DATABASE test;

Using phpMyAdmin

If you have phpMyAdmin installed you can drop databases easily (a little too easy, in my opinion). Log into phpMyAdmin, select the database you wish to drop and click the "Drop" option as shown in the screenshot below.

dropping a database with phpmyadmin

If Javascript is enabled then you'll be prompted like so before the database is actually dropped:

confirmation before dropping a phpmyadmin database

Click "OK" and the database will be dropped.

Related posts:

Share or Bookmark

Share or Bookmark this page using the following services. You will need to have an account with the selected service in order to post links or bookmark this page.

Subscribe or Follow

Subscribe via RSS or email, or follow me on Facebook or Twitter below. The RSS icon takes you through to Feedburner where you can select the service or application to use.

Comments

blog comments powered by Disqus