Drop all tables in MySQL database

Drop all tables in MySQL database

Answer:

MySQL does not have a command for removing all database table(s) without dropping the database, to do so, you need the following tricks:

# mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] 
| grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]
原文地址:https://www.cnblogs.com/seasonzone/p/4105553.html