Makerere University

Enter a keyword or two into the search box above and click search..

How to Drop all Tables in a Database

You are here

There are many ways available on the internet. Google search them, you'll find them.

Many seem to agree that the easiest way is to Delete and Recreate the database its self.. i.e.

#Popular Method

mysql> DROP DATABASE database;

mysql> CREATE DATABASE database;

#Another Method

mysqldump -u${user} -p${pass} -h ${host} --add-drop-table --no-data ${database} | grep ^DROP | mysql -u${user} -p${pass} -h ${host} ${database}