- Instant help with your Sql coding problems

Backup MySQL database

Question:
How to backup MySQL database?
Answer:
mysqldump -u testuser -p testdb > /tmp/backup.sql

mysqldump -u [MYSQL_USER] -p [DATABASE_NAME] > [OUTPUT_FILE]

Description:

The mysqldump client utility performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data. It dumps one or more MySQL databases for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.

Reference:
mysqldump reference
Share "How to backup MySQL database?"