卡饭网 > apache > 正文

重装windows系统后,如何重新将apache,mysql加入系统服务

来源:本站整理 作者:梦在深巷 时间:2014-04-16 06:17:19

重装windows7 64 位后,想把mysql加到系统服务里面,

命令如下:

mysqld.exe --install,报以下错误:

Install/Remove of the Service Denied!

解决方案:

此错误是由于当前用户没有管理员权限造成的。开始——CMD.exe——右键,以管理员身份运行,然后按照以以下命令即可将mysql加到系统服务里面去

mysqld.exe --install

httpd.exe -k install

进阶:

1、mysql5.1以前版本用 mysqld-nt

2、指定服务名称 启动脚本

mysqld.exe --install mysql5.5 --defaults-file="D:mysql5.5my.ini"

httpd.exe -k install -n "Apache2.2" -f “D:apache2.2confhttpd.conf

3、启动停止服务

net start mysql

net start apache2.2

net stop mysql

net stop apache2.2

3、删除服务

mysqld.exe --remove

httpd.exe -k uninstall 或者 httpd.exe -k uninstall -n "Apache2.2"

相关推荐