Last active
November 20, 2020 22:41
-
-
Save kudosqujo/a65819080d75c7643338bea792408e5b to your computer and use it in GitHub Desktop.
[MySQL Cheatsheet] commands #mysql #cheatsheet
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
# Create a new db | |
mysqladmin -u root -p create some_db.test | |
# Create a dump from a local DB | |
mysqldump -u some_user -p some_db.test > some_db.test.dump.sql | |
# Create a dump from a remote host (like an RDS snapshot) | |
mysqldump -u some_user -p -h my-db-1234.somehash.us-north-1.rds.amazonaws.com some_db.test > some_db.test.dump.sql | |
# Populate a db using a dump | |
mysql -u root -p some_db.test < some_db.test.dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment