当前位置: 移动技术网 > IT编程>数据库>Mysql > mysql 5.7.11 winx64.zip安装配置方法图文教程

mysql 5.7.11 winx64.zip安装配置方法图文教程

2017年12月12日  | 移动技术网IT编程  | 我要评论

窦树军,圣罗兰名模,石元爱

安装和配置mysql数据库系统。

 1、下载

http://cdn.mysql.com//downloads/mysql-5.7/mysql-5.7.11-winx64.zip

2.解压缩zip包

d:\program files\mysql-5.7.11-winx64 

3.配置环境变量

3.1 添加path路径,

d:\program files\mysql-5.7.11-winx64\bin

3.2.修改mysql-default.ini配置文件,

# these are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....

改为

# these are commonly set, remove the # and set as required.
 basedir = d:\program files\mysql-5.7.11-winx64
 datadir = d:\program files\mysql-5.7.11-winx64\data
 port = 3306
# server_id = .....

4.以管理员身份进入命令提示符 cmd 

进入mysql的bin目录下,

microsoft windows [版本 6.3.9600]
(c) 2013 microsoft corporation。保留所有权利。

c:\users\administrator>cd d:
d:\

c:\users\administrator>cd d:\program files\mysql-5.7.11-winx64\bin

c:\users\administrator>d:

d:\program files\mysql-5.7.11-winx64\bin> 

执行mysqld.exe --initialize 命令,

d:\program files\mysql-5.7.11-winx64\bin>mysqld.exe --initialize
d:\program files\mysql-5.7.11-winx64\bin>

创建了data目录

5.执行 mysqld -install命令

d:\program files\mysql-5.7.11-winx64\bin>mysqld -install
service successfully installed. //成功安装服务

 6.执行mysqld.exe -nt --skip-grant-tables

注意:窗口无反应

microsoft windows [版本 6.3.9600]
(c) 2013 microsoft corporation。保留所有权利。

c:\users\administrator>cd d:
d:\

c:\users\administrator>cd d:\program files\mysql-5.7.11-winx64\bin

c:\users\administrator>d:

d:\program files\mysql-5.7.11-winx64\bin>mysqld.exe --initialize

d:\program files\mysql-5.7.11-winx64\bin>mysqld -install
service successfully installed. //服务安装成功

d:\program files\mysql-5.7.11-winx64\bin>mysqld.exe -nt --skip-grant-tables 

7.重新打开dos窗口,执行mysql -u root

进入mysql命令行,执行命令use mysql; update user set authtication_string=password('123456') where user="root"; set password=password('123456');

按 ctrl+c 复制代码

microsoft windows [版本 6.3.9600]
(c) 2013 microsoft corporation。保留所有权利。

c:\users\administrator>mysqld.exe -nt --skip-grant-tables

c:\users\administrator>mysql -u root
welcome to the mysql monitor. commands end with ; or \g.
your mysql connection id is 3
server version: 5.7.11 mysql community server (gpl)

copyright (c) 2000, 2016, oracle and/or its affiliates. all rights reserved.

oracle is a registered trademark of oracle corporation and/or its
affiliates. other names may be trademarks of their respective
owners.

type 'help;' or '\h' for help. type '\c' to clear the current input statement.

mysql> use mysql
database changed
mysql> update user set authtication_string=password('123456') where user="root"
 -> set password=password('123456')
 ->

按 ctrl+c 复制代码

8.在任务管理器中终止mysqld进程,开启mysql服务。

安装完成。

精彩专题分享:mysql不同版本安装教程 mysql5.7各版本安装教程 mysql5.6各版本安装教程

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网