Skip to content

Instantly share code, notes, and snippets.

@chris-at-github
Last active March 2, 2017 07:03
Show Gist options
  • Save chris-at-github/5763967 to your computer and use it in GitHub Desktop.
Save chris-at-github/5763967 to your computer and use it in GitHub Desktop.
MySQL
// 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
// 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