Created
June 15, 2016 15:10
-
-
Save j-n-c/9e1fcf16fb8cc3c3b55600d15b62a40c to your computer and use it in GitHub Desktop.
MySQL DUMP and RESTORE
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
| -> Backup MySQL Database | |
| mysqldump -h <host_IP_addr> -u <user> --databases <database_name> -p > <name_of_dump_file>.sql | |
| e.g. mysqldump -h 127.0.0.1 -u root --databases my_database -p > xpto.sql | |
| -> Restore MySQL Database | |
| mysql -p -h <host_IP_addr> -u <user> < <name_of_dump_file>.sql | |
| e.g. mysql -p -h 192.168.1.40 -u my_user < xpto.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment