Last active
July 2, 2022 02:16
-
-
Save batigolix/fe6580bf94f89dddaf37e302e2912725 to your computer and use it in GitHub Desktop.
mysql one liners
This file contains hidden or 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
# drop db, create db, import db | |
mysql -uroot -proot -D -e "DROP DATABASE mydatabase";mysql -uroot -proot -D -e "CREATE DATABASE mydatabase";mysql -uroot -proot mydatabase < mydatabase.sql | |
# drop db, create db, unzip db, import db | |
mysql -uroot -proot -D -e "DROP DATABASE mydatabase";mysql -uroot -proot -D -e "CREATE DATABASE mydatabase";gunzip mydatabase.sql.gz | mysql -uroot -proot mydatabase < mydatabase.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment