Create a backup of a MySQL database to a file using mysqldump utility.
mysqldump -u USERNAME -p DBNAME > DBNAME.export.sql