Backup A MySQL Database
From NetworkStuff
Use the following command and syntax to backup a MySQL database;
mysqldump --database database_name -u username -p --add-drop-table -B > file_name.sql
You will be prompted to enter the password for the specified user account.
Usage Notes
The .sql extension is optional.
To add the current date to the filename, use the following command syntax;
mysqldump --database database_name -u username -p --add-drop-table -B > file_name-`date +%y-%m-%d`.sql
Related Commands
See our MySQL Command articles.
Related Articles
Should you need to restore a MySQL database, see our Restore A MySQL Database article
Take a look at our other MySQL and How To... articles
Information on Linux commands
Information on F5 BigIP commands
Information on Cisco commands
Information on Windows commands
Information on Vyatta commands
Information on Extreme commands
Information on Nortel commands
Information on Zebra commands
Information on Secure Platform commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands




