• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1358
  • Last Modified:

MYSQL, Drop All Tables With SSH

How do you drop all the tables in a mysql database with SSH?
0
walker6o9
Asked:
walker6o9
1 Solution
 
DubouxCommented:

# 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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now