mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 09:02:08 +02:00
mysqldump: use long options, correct command name
This commit is contained in:
parent
536a64ea1c
commit
40af8c1f54
1 changed files with 6 additions and 6 deletions
|
@ -3,18 +3,18 @@
|
||||||
> Backups MySQL databases.
|
> Backups MySQL databases.
|
||||||
> More information: <https://dev.mysql.com/doc/refman/en/mysqldump.html>.
|
> More information: <https://dev.mysql.com/doc/refman/en/mysqldump.html>.
|
||||||
|
|
||||||
- Create a backup, user will be prompted for a password:
|
- Create a backup (user will be prompted for a password):
|
||||||
|
|
||||||
`mysqldump -u {{user}} -p {{database_name}} -r {{filename.sql}}`
|
`mysqldump --user {{user}} --password {{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}} -p {{database_name}} < {{filename.sql}}`
|
`mysqldump --user {{user}} --password {{database_name}} < {{path/to/file.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):
|
||||||
|
|
||||||
`mysqldump -u {{user}} -p --all-databases > {{filename.sql}}`
|
`mysqldump --user {{user}} --password --all-databases > {{filename.sql}}`
|
||||||
|
|
||||||
- Restore all databases from a backup (user will be prompted for a password):
|
- Restore all databases from a backup (user will be prompted for a password):
|
||||||
|
|
||||||
`mysql -u {{user}} -p < {{filename.sql}}`
|
`mysqldump --user {{user}} --password < {{filename.sql}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue