Batch processing command:
Set "ymd=%date:~,4%%date:~5,2%%date:~8,2%"
Set "hms=%time:~,2%%time:~3,2%%time:~6,2%"
Mysqldump-uroot--password=password weixin> D:\mysql_back\weixin_%Ymd%_%hMs%.sql
Command explanation
To use mysqldump to set environment variables
Mysqldump.exe Program in the bin directory of the MySQL installation directory
set is a command for a batch set variable
%date:~,4% is a string that takes the date variable position 0 starting at length 4
%date:~5,2% is a string that takes the date variable position 5 starting at length 4
Weixin is the name of the database.
> behind is the output directory
Windows Task Scheduling implementation performs batch processing at a time interval
Run (win+r) enter taskschd.msc to open the Task Scheduler
Click Task Scheduler Library
Right there's a basic task to create
Step by step with
Finally, enter the path of the batch process to
Task Scheduler can be managed in Task Scheduler
The above is organized by brother even IT education. Brother even PHP training .
MySQL Tutorial-Automatically back up the database