1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 07:35:24 +02:00

mysqldump: Add examples to backup/restore all databases with file redirection (#3177)

This commit is contained in:
Peter Nguyen 2019-07-09 18:31:13 +02:00 committed by Andrik Albuquerque
parent 900a94e02d
commit 58c37e2933

View file

@ -10,3 +10,11 @@
- Restore a backup, user will be prompted for a password:
`mysql -u {{user}} --password -e "source {{filename.sql}}" {{database_name}}`
- Backup all databases redirecting the output to a file (user will be prompted for a password):
`mysqldump -u {{user}} -p --all-databases > {{filename.sql}}`
- Restore all databases from a backup (user will be prompted for a password):
`mysql -u {{user}} -p < {{filename.sql}}`