MySql Drop All Tables

One line command:

mysqldump -u[user] -p[ssht...] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[user] -p[sshht...] [DATABASE]

Can also be used with the -h option in both places.
If you use the empty -p options, you'll have to enter the password twice after running the command. The 2nd time, the password will show in clear text while typing.

Comments