rem auther:www.yumi-info.com
rem date:20171222
rem ******MySQL backup start********
@echo off
forfiles /p "D:\phpStudy\backup" /m backup_*.sql -d -30 /c "cmd /c del /f @path"
set "Ymd=%date:~0,4%%date:~5,2%%date:~8,2%0%time:~1,1%%time:~3,2%%time:~6,2%"
"D:\phpStudy\MySQL\bin\mysqldump.exe" --opt --single-transaction=TRUE --user=root --password=123456 --host=127.0.0.1 --protocol=tcp --port=3306 --default-character-set=utf8 --single-transaction=TRUE --routines --events "mindoc_db" > "D:\phpStudy\backup\backup_%Ymd%.sql"
@echo ON
rem ******MySQL backup end********
评论已关闭