Command Line

Backups are an essential part of development. You always want backups. mysqldump is the goto program to backup mysql databases

Backup a database

mysqldump database_name > database_dump.sql

Backup a database with username and password

mysqldump -u username -p password database_name > database_dump.sql

Backup a database with username and password and compressed

Gzip
mysqldump -u username -p password database_name | gzip > database_dump.sql.gz
Bzip
mysqldump -u username -p password database_name | bzip2 > database_dump.sql.bz2