码迷,mamicode.com
首页 > 数据库 > 详细

window 平台下 备份MySQL (脚本)

时间:2014-11-26 16:49:29      阅读:288      评论:0      收藏:0      [点我收藏+]

标签:mysql   备份   window   

@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 (脚本)

标签:mysql   备份   window   

原文地址:http://dwchaoyue.blog.51cto.com/2826417/1582742

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!