Dropping all tables in a MySQL database.

Blows out schema but leaves db with permissions etc. intact.

mysqldump -u<USER> -p<PASS> --add-drop-table --no-data <DATABASE> | grep ^DROP | mysql -u<USER> -p<PASS> <DATABASE>
This entry was posted in Code, Databases, Linux, MySQL. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *