@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
"C:Program FilesMySQLMySQL Server 5.7inmysqldump" --opt -u root --password=123123 test > C:javafebs_%Ymd%.sql
@echo on
注:使用时记得删除注释
bat文件备份数据库
原文地址:https://www.cnblogs.com/java-h/p/13689861.html