Home > Database > Mysql Tutorial > body text

手动将MySQL服务安装到windows中_MySQL

WBOY
Release: 2016-06-01 13:17:36
Original
839 people have browsed it

我的系统是win7 x64,mysql版本5.6 (网上的老教程很多都没用了,版本太旧,这是我自己总结出来的方法)

下载zip包的mysql可以获得最新版本,还可以免安装,好处多多,但是要把mysql安装到windows的服务中才可以开机启动,不然每次都要手动启动mysqld.exe。

安装过程其实简单:

  1. 打开cmd,cd到mysql文件的bin目录,我的是解压到了C:/Program Files/mysql,于是输入
    cd "C:/Program Files/mysql/bin"
    Copy after login
  2. 使用mysqld.exe安装服务
    mysqld --install
    Copy after login
  3. 提示安装成功了,但是这时候还是不能使用的,需要修改路径,这里使用sc命令,binpath表示路径(请修改为你的mysqld所在路径),路径后面跟了一个MySQL是mysqld.exe本身的参数(安装时默认添加的)。
    sc config MySQL binpath= "C:/Program Files/mysql/bin/mysqld MySQL"
    Copy after login

    为什么要做这一步呢,网上很多人说安装后不能启动服务,打开计算机管理——服务,查看MySQL服务属性,就会发现,默认的路径是不正确的,需要修改为正确的路径。

 

OK,至此MySQL服务就安装完成了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!