vbs脚本实现window环境下的mysql数据库的备份
保存为backup_mysql.vbs文件Dim oShell,user,pass,db,path,name
user="root"
pass="123456"
db="test"
path="c:\"
name=db&"_"&Year(date)&"-"&month(date)&"-"&day(date)&".sql"
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "cmd /C C:\mysql\bin\mysqldump.exe -u"& user &" -p"& pass & space(1) & db &">"&path&name
Set oShell = Nothing
页:
[1]