windows下自动备份mysql数据库脚本

@echo off
if /i %time:~0,2% lss 10 set abc=website%date:~0,10%_%time:~1,1%_%time:~3,2%
if /i not %time:~0,2% lss 10 set abc=website%date:~0,10%_%time:~0,2%_%time:~3,2%
cd C:\Program Files\MySQL\MySQL Server 5.0\bin
mysqldump --opt -u root --password= website > D:\db_backup\%abc%.sql

你可能感兴趣的:(MySQL)