复制代码 代码如下:
[html]
@echo off
echo -------------------------
echo mysql backup
echo 2012.11.18
echo -------------------------
set year=%date:~0,4%
set month=%date:~5,2%
set day=%date:~8,2%
set scx_db=scx_db_%year%%month%%day%.sql
set scxdb_db=scxdb_db_%year%%month%%day%.sql
rem 这里是注释部分
rem net stop mysql
rem net start mysql
cd D:/Program Files/phpStudy/MySQL/bin
mysqldump -uroot -proot scx >d:/bat/%scx_db%
mysqldump -uroot -proot scxdb>d:/bat/%scxdb_db%
cd /
cd bat
@echo off
rem pause
新闻热点
疑难解答