首页 > 代码库 > windows定时备份MYSQL

windows定时备份MYSQL

@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
cd D:
md %Ymd%
cd "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin"
cd C:
mysqldump -u root -proot -h xx.xx.xx.xx eoss-product > D:/%Ymd%/%Ymd%.sql
exit

-h 后边是要连接的MYSQL 数据库的IP 如果是本机  则不需要写 -h 

windows定时备份MYSQL