There are many ways to backup MySQL databases on Windows, including phpMyAdmin and MySQL Administrator.
Configure and run the first PHP script in order to create a batch file.
Review and run the batch file in order to export MySQL data into a .SQL file.
Optionally configure and run the second PHP script in order to move the .SQL file into a .GZ archive.
The first script will create a batch file containing the command line for mysqsldump.exe. The batch file is created in order to use the current system date as part of the dump filename, and also to grab the name of each MySQL database.
The intended output directory structure used in this example is the name of each database: c:\backup\mysql5\$db\.sql
If the output directory structure does not contain a folder having the same name as an existing database, an attempt will be made to create a the directory at c:\backup\mysql5\$db\