tldr/pages/common/mysqldump.md

12 lines
298 B
Markdown
Raw Normal View History

2014-04-15 09:54:01 +01:00
# mysqldump
2015-10-22 08:31:52 +01:00
> Backups mysql databases
2014-04-15 09:54:01 +01:00
- Create a backup, user will be prompted for a password
2014-04-15 09:54:01 +01:00
`mysqldump -u {{user}} --password {{database_name}} > {{filename.sql}}`
2014-04-15 09:54:01 +01:00
- Restoring a backup, user will be prompted for a password
2014-04-15 09:54:01 +01:00
`mysql -u {{user}} --password {{database_name}} < {{filename.sql}}`