MySQL: drop all tables

Sep 21, 2013

mysql , code

mysql -Nse 'show tables' -u <user> -h <host> <dbname>| while read table; do \
mysql -e "drop table $table" -u <user> -h <host> <dbname>; 
done

Links Awards & recognitions Resume Personal Technical Miscellaneous My Blog
 
Last Updated: Sep 21 2013