首页 > 代码库 > window 平台下 备份MySQL (脚本)

window 平台下 备份MySQL (脚本)

@echo off 

echo ------------------------- 

echo mysql backup 

echo 2014.11.26

echo ------------------------- 


set jtkd_d=jtkd_d_%date:~0,4%%date:~5,2%%date:~8,2%.sql 

set jtkd_accountdb=jtkd_accountdb_%date:~0,4%%date:~5,2%%date:~8,2%.sql 

set jtkd_static=jtkd_static_%date:~0,4%%date:~5,2%%date:~8,2%.sql 

set jtkd_statistics=jtkd_statistics_%date:~0,4%%date:~5,2%%date:~8,2%.sql 


cd D:\Program Files\MySQL\MySQL Server 5.5\bin


mysqldump -uroot -proot --databases jtkd --routines --events --triggers >D:\BACKUP\%jtkd_d% 


cd \ 


cd bat 


@echo off 


rem pause 


本文出自 “SQLServer MySQL” 博客,请务必保留此出处http://dwchaoyue.blog.51cto.com/2826417/1582742

window 平台下 备份MySQL (脚本)