脚本启动mysql

1646 2022-05-11 20:30

@echo off
:: 获取管理员权限
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
 
@echo begin stop mysql server ...
net stop mysql
 
TIMEOUT /T 2
@echo begin start mysql server ...
 
net start mysql
 
:: 暂停
:: @pause
 
:: 退出
exit 

存成bat文件

全部评论

·