当前位置: 移动技术网 > IT编程>数据库>Mysql > win10下mysql 5.7.17 zip压缩包版安装教程

win10下mysql 5.7.17 zip压缩包版安装教程

2017年12月12日  | 移动技术网IT编程  | 我要评论
mysql5.7.17安装教程分享给大家,供大家参考,具体内容如下 从官网下载zip 解压  d:\devtool\mysql-5.7.17-winx64

mysql5.7.17安装教程分享给大家,供大家参考,具体内容如下

从官网下载zip

解压

 d:\devtool\mysql-5.7.17-winx64\ 

  d:\devtool\mysql-5.7.17-winx64\bin  加入环境变量 

在任务栏 windows图标上右键->命令提示符(管理员), 以管理员身份运行 cmd , cd 到d:\devtool\mysql-5.7.17-winx64\bin。 不以管理员运行会出现权限不够被拒绝

依次运行以下三条命令

mysqld --initialize-insecure

会自动在 d:\devtool\mysql-5.7.17-winx64\ 下创建data目录,不必手工创建data目录

mysqld -install

这步是安装 mysql 服务, 如果不是管理员运行会提示 “install/remove of the service denied!” , 如果不cd到 mysql的bin目录 服务安装后路径默认在 c:\program files\mysql\ , 启动服务会失败 提示 “

发生系统错误 2。 系统找不到指定的文件”

net start mysql

这步是启动mysql 服务, 如果没有第一步 这步会启动失败 并提示 “请键入 net helpmsg 3534 以获得更多的帮助”

启动mysql以后就可以 在cmd 中 输入 mysql -u root -p  enter 完成初次登陆了

welcome to the mysql monitor. commands end with ; or \g.
your mysql connection id is 7
server version: 5.7.17

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> 

参考资料:

从mysql5.7.6开始,安装mysql提示“请键入 net helpmsg 3534 以获得更多的帮助”的解决办法

mysql 5.6 for windows 解压缩版配置安装

补充资料 :

启动mysql以后就可以 在cmd 中 输入 mysql -u root -p  enter初次登陆了,按照以前的一些文章来看初始密码为空但是直接enter后出现“error 1045 (28000): access denied for user 'root'@'localhost' (using password: no)”  搜索后 这篇文章是linux上的,但是提到生成了一个随机密码, 直接告诉我可能在自动生成的data目录里能发现什么, 打开其中 “计算机名.err”的文件 (计算机名根据实际情况不同,不是本身这几个字) 搜索password 果然搜到, 尝试那个密码成功

可以选择用 --initialize-insecure 或者 --initialize 来初始化,--initialize-insecure 初始化root密码为空,如果用 --initialize来初始化,会产生一个随机密码

——摘自 - happymzw 

官方文档上有:

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

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网