@echo off
set "Ymd=%date:,4%%date:5,2%%date:~8,2%"
D:\develop\mysql-5.7\mysql-5.7.26-winx64\bin\mysqldump -uroot -p1234 --single-transaction --databases db > D:\mysqlbatup\mcp_%Ymd%.sql
@echo on
修改后缀名为bat然后以管理员的身份运行
就会得到一个备份的sql文件
mysql备份失败方案汇总:http://cuohei.com/innodb/2030.html
mysqldump备份流程:http://www.freeoa.net/osuport/db/mysqldump-lock-on-backup_1453.html
mysqldump备份参数大全:https://www.cnblogs.com/qq78292959/p/3637135.html
Windows如何做定时任务:https://blog.csdn.net/u012745499/article/details/126616013
标签:www,dump,备份,数据备份,html,mysqldump,mysql,date From: https://blog.51cto.com/u_15869608/5976518