How to delete all tables of a DB in MySQL?

Posted July 29, 2011 - By | Comments Off

mysql -u $user -p$pass -h $dbhost $db -e “show tables” | grep -v Tables_in | grep -v “+” | awk ‘{print “drop table ” $1 “;”}’ | mysql -u $user -p$pass -h $dbhost $db

Published under : Shout

Sorry, the comment form is closed at this time.