harmonize mysqldump examples

- always use `-p` for password
- use short hand syntax for restoring a database (like the one used for restoring all databases)
client-spec/clarity
b_b 2020-02-04 15:52:18 +01:00 committed by Marco Bonelli
parent d90bdb3ba1
commit 536a64ea1c
1 changed files with 2 additions and 2 deletions

View File

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