一、安装及御载MySQL服务
点击开始->运行,输入services.msc启动服务功能,如果发现以前安装过mysql,但是突然发现MySQL服务不见了,此时可以手动安装MySQL服务。
进入mysql目录
E:\www\mysql>cd bin
安装mysql服务
E:\www\mysql\bin>mysqld -install
Service successfully installed.
启动mysql服务
E:\www\mysql\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
停止mysql服务
E:\www\mysql\bin>net stop mysql
MySQL 服务正在停止.
MySQL 服务已成功停止。
御载mysql服务
E:\www\mysql\bin>mysqld -remove
Service successfully removed.
再次刷新windows服务,发现mysql服务已经不见了,说明已经御载服务成功了。
如果启动服务的时候报1067的错误,执行如下的操作即可:
E:\www\mysql\bin>mysqladmin -u root -p shutdown
Enter password: *******
E:\www\mysql\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
http://www.baidu.com/s?wd=mysql%201067
二、查看mysqld命令的帮助选项
E:\www\mysql\bin>mysqld --verbose --help
此命令的输出内容较多,此时后面可以加上find命令进行查找,
查找与安装服务相关的帮助选项(install)
E:\www\mysql\bin>mysqld --verbose --help | find "install"
--install Install the default service (NT)
--install-manual Install the default service started manually (NT
)
--install service_name Install an optional service (NT)
--install-manual service_name Install an optional service started manually (NT
)
-b, --basedir=name Path to installation directory. All paths are usually
--bootstrap Used by mysql installation scripts.
查找与御载服务相关的帮助选项(remove)
E:\www\mysql\bin>mysqld --verbose --help | find "remove"
--remove Remove the default service from the service list
(NT)
--remove service_name Remove the service_name from the service list (N
T)
--console Write error output on screen; Don't remove the console
延伸阅读:
http://www.baidu.com/s?wd=windows%20mysql%20%20安装服务
http://www.baidu.com/s?wd=mysql%201067
http://jingyan.baidu.com/article/870c6fc3283192b03fe4be3f.html
http://blog.csdn.net/vince6799/article/details/7337399