mysql 在windons下的备份命令

1、

@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
mysqldump -uroot -proot jy510 > E:/backup/jy510.sql
@echo on

 

2、

@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
E:/wamp/bin/mysql/mysql5.5.8/bin/mysqldump --opt -u root --password=root jy510 > E:/backup/jy510_%Ymd%.sql
@echo on

posted @ 2018-01-11 09:46  hechunhua  阅读(113)  评论(0编辑  收藏  举报