In order to backup MySQL database in windows, we need to make a batch file. The contents of the batch file should be as follows:
o—–
@echo off
echo Running dump…
c:
cd \
cd “wampp2″
cd mysql
cd bin
mysqldump -u<user> -<pass> –all-databases –result-file=”c:\data\backup.%DATE:~0,3%.sql”
echo Done!
0—–
Okay now that our batch file is made we can run it and verify that it created an output .sql file in c:\data\
If it did, let’s schedule it so it runs once a day. To schedule a task in Windows I prefer to use the commandline “AT” command.
So let’s open a command prompt and type:
c:\> at 02:00 /every:M,T,W,Th,F,S,Su c:\data\backup.bat
This is a self explanatory command. It will automatically run our new backup batch file every day at 2:00.
If you have any questions, post in the comments.





No User Responded In This Post
Sorry the comment area are closed