Daily Archives: March 30, 2012

You are browsing the site archives by date.

Delete all tables in a MySQL database

I was looking for a script to delete all tables in a MySQL database without having to drop the database.

mysqldump -u [username] -p --add-drop-table [database] | grep ^DROP | mysql -u [username] -p

/cc @davelens