mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-08 02:35:38 +02:00
harmonize mysqldump examples
- always use `-p` for password - use short hand syntax for restoring a database (like the one used for restoring all databases)
This commit is contained in:
parent
d90bdb3ba1
commit
536a64ea1c
1 changed files with 2 additions and 2 deletions
|
@ -5,11 +5,11 @@
|
||||||
|
|
||||||
- Create a backup, user will be prompted for a password:
|
- 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:
|
- 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):
|
- Backup all databases redirecting the output to a file (user will be prompted for a password):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue