Question 174:

How can I backup a MySQL database?


You can use the command mysqldump to backup the the MySQL database, e.g.

cd "\Program Files\MySQL\MySQL Server 5.5\bin"
mysqldump.exe -uUSER -pPASSWORD DATABASE > BACKUP.sql

To perform the backup automatically, create a script and have it executed with administrator rights by a scheduled task.

A restore can be performed interactively with the following command:

mysql.exe -u USER -p DATABASE < BACKUP.sql