Last active
March 2, 2017 07:03
-
-
Save chris-at-github/5763967 to your computer and use it in GitHub Desktop.
MySQL
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
// Standard | |
mysqldump --no-create-db --opt -Q -uUSER -p -hHOST DATENBANK > DATENBANK.sql | |
// Standard (Drop + Create Table) | |
mysqldump -uUSER -p -hHOST --verbose --no-create-db --add-drop-table DATENBANK > DATENBANK.sql | |
// Gepackt | |
mysqldump --databases --opt -Q -uUSER -p -hHOST DATENBANK | gzip > DATENBANK.gz | |
// nur Daten | |
mysqldump -uUSER -pPASSWORT -hHOST --verbose --no-create-db --no-create-info DATENBANK > DATENBANK.sql | |
// einzelne Tabellen | |
mysqldump --databases --opt -Q -uUSER -p -hHOST DATENBANK --tables table1 table2 table3 | gzip > DATENBANK.gz |
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
// Standard | |
mysql -u BENUTZER -pPASSWORT -h HOST -D DATENBANK < DUMP.sql | |
// Mit Encoding | |
mysql -u BENUTZER -pPASSWORT -h HOST -D DATENBANK --default-character-set=utf8 < DUMP.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment