@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
E:\software\mysql\bin\mysqldump --opt -u root --password=123456 databaseName > E:\backup\01database\databaseName_%Ymd%.sql
@echo on
注意:如果备份出来的问题是空的,请把路径用引号括起来。
@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
E:\software\mysql\bin\mysqldump --opt -u root --password=123456 databaseName > E:\backup\01database\databaseName_%Ymd%.sql
@echo on
注意:如果备份出来的问题是空的,请把路径用引号括起来。