1
0
mirror of https://github.com/cheat/cheat.git synced 2024-12-23 04:59:45 +01:00
cheat/cheatsheets/mysqldump

9 lines
286 B
Plaintext
Raw Normal View History

To dump a database to a file:
mysqldump -uusername -ppassword the-database > db.sql
To dump a database to a .tgz file:
mysqldump -uusername -ppassword the-database | gzip -9 > db.sql
To dump all databases to a file:
mysqldump -uusername -ppassword --all-databases > all-databases.sql