Windows cmd
开始 运行 输入cmd 回车 输入net start就可以查看windows开启了那些服务。
net start mysql 开启MySQL服务
net stop mysql 关闭MySQL服务
sc是用于与服务控制管理器和服务进行通信的命令行程序,其语法是:
sc config 服务名 start= demand //手动
sc config 服务名 start= auto //自动
sc config 服务名 start= disabled //禁用
sc start 服务名 开启服务
sc stop 服务名 停止服务
sc query 服务名 查看服务状态
sc delete 服务名 删除服务
sc qc 服务名 查看服务的配置信息
sc create scname binPath=xxx.exe 创建服务
例如