Windows10中安装mysql5.7.11 社区版64位
来源:互联网 发布:json decode null 编辑:程序博客网 时间:2024/06/02 21:06
首先,到官网里下载相应的zip包:
http://dev.mysql.com/downloads/mysql/
下载完成后解压到目标安装路径,比如说,D:\Program Files
mysql 5.7.11跟5.6的不一样在于其压缩包里面默认是没有data目录的,所以,解压缩后要进行某些初始化工作。
以管理员的权限打开cmd,快捷键Win+x,然后按a,确定即可打开具备管理员权限的cmd窗口。
切换到mysql的bin目录下输入mysqld --initialize-insecure:
这里为什么要用--initialize-insecure呢?
官网里有这么一段话描述:
To initialize the data directory, invoke mysqld with the
--initialize
or--initialize-insecure
option, depending on whether you want the server to generate a random initial password for the'root'@'localhost'
account....
The server creates a
'root'@'localhost'
superuser account. The server's action with respect to a password for this account depends on how you invoke it:
With
--initialize
but not--initialize-insecure
, the server generates a random password, marks it as expired, and writes a message displaying the password:[Warning] A temporary password is generated for root@localhost:iTag*AfrH5ejWith
--initialize-insecure
, (either with or without--initialize
because--initialize-insecure
implies--initialize
), the server does not generate a password or mark it expired, and writes a warning message:Warning] root@localhost is created with an empty password ! Pleaseconsider switching off the --initialize-insecure option.
Connect to the server:
If you used
--initialize
but not--initialize-insecure
to initialize the data directory, connect to the server asroot
using the random password that the server generated during the initialization sequence:shell>mysql -u root -p
Enter password:(enter the random root password here)
Look in the server error log if you do not know this password.
If you used
--initialize-insecure
to initialize the data directory, connect to the server asroot
without a password:shell>mysql -u root --skip-password
大意是说,如果使用--initialize参数初始化的话,则系统会产生一个随机的密码,而mysql默认的输出是不显示在控制台里的,所以我们会不知晓密码是什么。如果想用--initialize参数,则添加--console参数让输出导向到控制台里,则系统产生的随机密码便可以得到
接下来就启动并mysql:
启动mysql用的命令是
net start mysql
登录mysql用的命令是
mysql -u root --skip-password
登陆完毕后记得重设root用户密码,输入命令
ALTER USER 'root'@'localhost' IDENTIFIED BY 'yourpassword';
执行命令成功则显示Query OK。
输入 exit; 退出mysql:
接下来就是设置系统环境变量,添加mysql的bin目录到path上,过程就不详述了。
然后在path路径上添加
;%MYSQL_HOME%
注意前边有个 ;
至此,mysql已安装好。
此教程没有附上设置系统启动的,具体如何操作可以参考如下的官方文档:
官方参考文档地址:
http://dev.mysql.com/doc/refman/5.7/en/windows-installation.html
- Windows10中安装mysql5.7.11 社区版64位
- Windows10 64位系统安装MySQL5.6.34(压缩版)
- Windows10 64位安装MySQL5.6.35
- Windows10 64位安装MySQL5.6.35
- Mysql5.7.11解压版在windows10上的安装配置
- windows10 64位安装wget
- Windows10下MySQL5.7.19安装
- Windows10 64位 Python3.5 安装Scrapy
- Windows10 64位下安装TensorFlow
- TensorFlow安装(Windows10 64位 gpu)
- 【TensorFlow】Windows10 64位下安装TensorFlow
- Windows10 64位 Opencv+python 安装配置
- Windows10 64位下安装TensorFlow
- 【TensorFlow】Windows10 64位下安装TensorFlow
- 【TensorFlow】Windows10 64位下安装TensorFlow
- Windows10 64位 安装python xgboost 工具包
- 【TensorFlow】Windows10 64位下安装TensorFlow
- 64位windows10安装Sql server 2000
- JAVA SE——反射
- Android基础知识
- Ubuntu 15.10安装Swift
- Android新浪微博开发(一)授权认证
- MZTimerLabel 用作秒表或者倒计时
- Windows10中安装mysql5.7.11 社区版64位
- Unity3D 5 官方教程:标准着色器之材质参数(一)
- 输出图案题,当看到图案成对称的时候,想想绝对值。
- HDU1507 Uncle Tom's Inherited Land*(二分匹配 匈牙利算法)
- Android系统之SD卡分析三
- mysql 查询当天、最近一天、最近一周,本月,上一个月的数据
- 计算机网络1
- java学习之四——java面向对象的学习
- PRISM概率模型检测器初使用(2)--嵌入式控制系统模型