Scheduling MySQL Backups on Windows 7

Many people have had problems scheduling database backups using the MySQL Administrator tool.

We too ran into this problem a while back and here’s how we fixed it.

The Problem

Developing CMS’s for clients ultimately means that most of the data is stored within a database and that needs to be backed up regularly along with other source files.

We fired up the MySQL Administrator too (v1.1.9), created backup projects for our databases then scheduled them daily.

However, when we checked the next day there were no backup files and a pile of errors in the Windows Application event log (we use Windows 7 64-bit).

The Solution

After a lengthy search on the MySQL website and other references, we tracked the problem down to a bad command line switch that the MySQL Administrator inserts into the Windows scheduled task.

The bad command line was:

“X:MySQLMySQL Administrator 1.1MySQLAdministrator.exe” “-UDC:UsersXXXAppDataRoamingMySQL” “-c” “-bpProjectXXX” “-btX:projectsXXXsql” “-bxprojXXX-“

The “-c” command line switch seems to be in lower-case.  It should be in UPPER CASE.

Going into Windows Task Scheduler and manually changing the “-c” to uppercase “-C” worked perfectly and now all our scheduled MySQL databases are backed-up just fine.

The good command line is now:

“X:MySQLMySQL Administrator 1.1MySQLAdministrator.exe” “-UDC:UsersXXXAppDataRoamingMySQL” “-C” “-bpProjectXXX” “-btX:projectsXXXsql” “-bxprojXXX-“

We hope this saves you a lot of time and effort.

Was this article helpful?
YesNo