[references]
官网的教程较为啰嗦
MySQL :: MySQL 8.0 Reference Manual
MySQL :: MySQL 8.0 Reference Manual :: 2.3.4 Installing MySQL on Microsoft Windows Using a noinstall ZIP Archive
登录mysql参数介绍:
MySQL :: MySQL 8.0 Reference Manual :: 4.2.4 Connecting to the MySQL Server Using Command Options
third party reference link
在解压目录下创建my.ini
具体的目录名根据个人情况有所不同(我这里修改过目录名)
my.ini
内容
根据注释说明,按自己的喜好修改即可
第一个路径basedir
设置为压缩包解压后的路径
安装命令:
首先颜进入到解压目录下的bin目录下执行
(当然,也可以配置环境变量来简化路径输入)
for cmd:
mysqld.exe --initialize-insecure
for powershell:
./mysqld.exe --initialize-insecure
检查安装结果
如果命令执行中没有报错,那么到您指定的datadir
目录下查看,是否有一个MySQL_Data_Directory
目录
这里的MySQL_Data_Directory
所在目录以你的datadir
为准(在my.ini中的取值)
配置环境变量以及写入path中
可以去配置环境变量,然后可以在新建的终端中直接以mysql
访问程序
可以查询相关文章
安装服务
启用服务
net start mysql
使用
可以去配置环境变量,然后可以在新建的终端中直接以mysql
访问程序
mysql -u root -p
其实可以直接:
mysql -u root
(这里root 用户的密码采用默认值(空值))
更多查看参数介绍文档
workbench
新版本的mysql将不在发布mysqlWorkbench zip版,但是您可以额外安装workbench/或者使用旧版本
有如下选择
- Download the MSI installer.
- Download the zip archive for version 6.3.8, but remain at that version forever.
- Download the source and build it yourself with Visual Studio 2017 (instructions are in the