Home  >  Article  >  Database  >  mysql cmd 安装

mysql cmd 安装

WBOY
WBOYOriginal
2016-06-01 13:17:011174browse

1.下载Mysql安装包:mysql-5.6.12-win32.zip;

2.解压安装到D:/__dev下;

3.添加环境变量,创建MYSQL_HOME变量;  

  MYSQL_HOME=D:/_dev/mysql-5.6.12-win32

4.配置Path路径,、bin;  

  %MYSQL_HOME%/bin;

5.修改mysql-5.6.12-win32下的my-default.ini文件;  

  basedir = D:/__dev/mysql-5.6.12-win32  

  datadir = D:/__dev/mysql-5.6.12-win32/data  

  port =3306  

  server_id = 1

6.使用管理员权限运行命令窗口,切换工作目录为Path目录下,安装Mysql服务;  

  mysqld -install  

  出现Service successfully installed.  

  表示安装服务成功

7.启动mysql服务和修改密码  

   net start mysql  

   mysql>mysql -uroot  

   mysql>update mysql.user set password=PASSWORD('密码') where User='root';  

   mysql> flush privileges;

Statement:
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