From 2e69eb063cef8820dfba4d5fb8bce69bbe20ca25 Mon Sep 17 00:00:00 2001 From: Chris Lane Date: Mon, 26 Aug 2013 19:31:21 -0400 Subject: [PATCH] Trivial changes to the mysqldump cheatsheet. --- cheatsheets/mysqldump | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cheatsheets/mysqldump b/cheatsheets/mysqldump index c673e87..b7718cc 100644 --- a/cheatsheets/mysqldump +++ b/cheatsheets/mysqldump @@ -1,9 +1,18 @@ + # To dump a database to a file (Note that your password will appear in your command history!): +-mysqldump -uusername -ppassword the-database > db.sql + # To dump a database to a file: mysqldump -uusername -p the-database > db.sql + # To dump a database to a .tgz file (Note that your password will appear in your command history!): +-mysqldump -uusername -ppassword the-database | gzip -9 > db.sql + # To dump a database to a .tgz file: mysqldump -uusername -p the-database | gzip -9 > db.sql + # To dump all databases to a file (Note that your password will appear in your command history!): +-mysqldump -uusername -ppassword --all-databases > all-databases.sql + # To dump all databases to a file: mysqldump -uusername -p --all-databases > all-databases.sql @@ -11,4 +20,4 @@ mysqldump -uusername -p --all-databases > all-databases.sql mysqldump --no-data -uusername -p the-database > dump_file # To export the database data only: -mysqldump --no-create-info -uusername -p the-database > dump_file \ No newline at end of file +mysqldump --no-create-info -uusername -p the-database > dump_file