Last active
December 27, 2015 15:59
-
-
Save pandauxstudio/7352116 to your computer and use it in GitHub Desktop.
Drop all database tables with/without MySQL login.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# With MySQL login | |
DROP DATABASE dbName; | |
CREATE DATABASE dbName; | |
# Without MySQL login | |
/usr/bin/mysqldump -uuser_name -psecretpassword --add-drop-table database_name | grep ^DROP | /usr/bin/mysql -uuser_name -psecretpassword database_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment