热搜词
发表于 2009-6-14 13:08:52 | 显示全部楼层 |阅读模式
保存为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
全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-11-22 19:21 , Processed in 0.177531 second(s), 22 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team