There are a lot of internet on the Windows MySQL automatic backup method, but really can use not a few, some say is also very complex, difficult to operate.
We all know that MSSQL itself has its own schedule tasks can be used for automatic backup, but how do we automatically have a backup of MySQL?
This method is done using the bat batch process.
Hypothetical environment: MySQL installation Location: D:\Program files\mysql\mysql Server 5.0\data
The database name is: 952game database backup destination: d:\db_bak\ (the path of the disk you want to back up the database to) I'd like to have the Db-bak directory on the D-Disk ============================ new Db_ Bak.bat, write the following code
net stop MySQL
xcopy C:\mysql\data\bbs\*.* d:\db_bak\bbs\%date:~0,3%\/y
net start MySQL
Detailed
The best step is to realize how to regularly backup, with me to learn! Go Go Go
Here we take the simplest approach
Use the Windows Scheduled tasks to execute the batch script at timed intervals. (ex: Daily 3 o'clock in the morning execution of Back_db.bat)
If not, please read the text:
1, run, scheduled tasks
2. Add a scheduled task.
3, the last step is to specify the backup time.
It is easy to complete the automatic scheduled backup here.
Finally, let's say one more word about this batch command \%date:~0,3% the meaning of extracting the day of the week information
Of course, if you want to create years and days of the words with%date:~0,10%, the system will give you a daily directory of the date. It's very convenient.
%date:~0,10%//Extract date information
%date:~-3%//Extract Day of the week information
Time and minutes in%time:~0,5%//extraction Time
%time:~0,-3%//extract time and minute and second information
[Go]mysql the best way to automatically schedule backups of a database-support for Windows systems