Thursday, October 20, 2011

Schedule backup MySQL database in Windows Server


I tried to use MySQL query browser to backup MySQL database in Windows 2003 server, but failed.
Step 1:
1) Start MySQL query browser.
2) Go to Tools ->MySQL administration, click backup, move the database you want to backup to right column
3)new project->project name: gnsh_backup, save project.
4) click Schedule: Error message: "A schedule backup requires a stored connection"
click Schedule: Error message: "A schedule backup requires a stored connection"

Step 2:
Switch using Scheduled Tasks in Windows:
1)Control Pane -> Scheduled Tasks.
2) Click "Add Scheduled Task", select backup,  daily, set name gnsh_backup,
10:10 pm every day, start date 10/20/2011, enter: user name and
password.
3) Select "open advanced window"
In Run column, enter:
"C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLAdministrator.exe" "-UDC:\Documents and Settings\Administrator\Application Data\MySQL\" "-cRoot" "-bpgnsh_backup" "-btC:\sql_dumps\mysql_admin\" "-bxgnsh_
In Start Column in:
"C:\Documents and Settings\Administrator\Application Data\MySQL\

Note: Explanation of  MySQLAdministrator.exe command line:
C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLAdministrator.exe" -cServer -bpProject-Name -btC:\SQLDUMP -bxDump-Name
 Note Project-Name is defined in step 1.

MySQL database is successfully backuped daily automatically.

No comments:

Post a Comment