MYSQL, Drop All Tables With SSH

How do you drop all the tables in a mysql database with SSH?
LVL 1
walker6o9Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
DubouxConnect With a Mentor Commented:

# mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]

Or just drop and recreate the database, although then you'd loose all existing settings like charactersets, collation and permissions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.