上图是常规操作
接下通过脚本方式启动
- 创建文本
- 重命名如mysql.bat
- 编辑上述文件内容
-
@echo off for /f "skip=3 tokens=4" %%i in ('sc query mysql') do set "zt=%%i" &goto :next :next if /i "%zt%"=="RUNNING" ( echo mysql is running, is stoping net stop mysql ) else ( echo mysql is stop, is starting net start mysql ) exit pause
5.报存内容
-
双击点击试试结果
更多推荐
通过.bat快速启动和关闭mysql服务
发布评论