@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
D:/wamp64/bin/mysql/mysql5.7.14/bin/mysqldump --opt -u root --password=123456 database > E:/Database/backupDB_all/test_%Ymd%.sql
@echo on
远程备份
@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
C:/wamp64/bin/mysql/mysql5.7.14/bin/mysqldump --opt -h 127.0.0.1 -u root --password="123456" database > E:/Database/backupDB_all/test_%Ymd%.sql
@echo on