今天在windows服务器上面写了一个MySQL定时任务,备份呢与删除 rem *****************************Code start**************************** @echo off set SrcDir=E:\mysql_backup set DaysAgo= set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%" "C:\Program Files\MySQL\MySQL Server 5.
1.写MySQL备份bat处理 @echo off set "yMd=%date:~,4%%date:~5,2%%date:~8,2%" set "hms=%time:~,2%%time:~3,2%%time:~6,2%" "C:/Program Files (x86)/MySQL/MySQL Server 5.5/bin/mysqldump.exe" -uroot -p123456 demo>D:/mysql_backup_%yMd%-%