mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 08:58:28 +01:00
6083e2d70b
I also modified the previous commands so passwords don't show in the history.
14 lines
No EOL
471 B
Text
14 lines
No EOL
471 B
Text
# To dump a database to a file:
|
|
mysqldump -uusername -p the-database > 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:
|
|
mysqldump -uusername -p --all-databases > all-databases.sql
|
|
|
|
# To export the database structure only:
|
|
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 |