1.打开网址https:/dev.mysql.com/downloads/installer/下载
![](https://img-blog.csdnimg.cn/img_convert/143d1faf8f50622fb15033c1dfadcdd1.png)
选择后者离线安装版本
2.双击下载的mysql-installer-community-8.0.32.0.msi文件,系统近入Choosing a Setup Type(选择安装类型)窗口,这里选择Custom(自定义安装类型),单击Next按钮进入下一步,
![](https://img-blog.csdnimg.cn/img_convert/2744f0f2849fa2c97e6158a263325a3c.png)
3.进入Select Products and Features(产品定制选择)窗口,选择MySQL Server 8.0.32-x64、MySQL Documentation 8.0.32-x86和MySQL Samples and Examples 8.0.32-x86,单击Next按钮进入下一步。
![](https://img-blog.csdnimg.cn/img_convert/ff38d60a594bb5a6204bb26ff7b0d021.png)
4.进入Installation(安装)窗口,单击Execute按钮,
![](https://img-blog.csdnimg.cn/img_convert/b1407891654bfe71c98e78f01347c9fb.png)
5.开始安装MySQL文件,安装完成后在Status(状态)列显示complete(完成),随后单击Next按钮。
![](https://img-blog.csdnimg.cn/img_convert/924378f36785366d41419361093a42f8.png)
6.单击Next按钮,进入Product Configuration(产品配置窗口),
![](https://img-blog.csdnimg.cn/img_convert/17b823379a86e4ffc04f6f65012e733a.png)
7.单击Next,按钮,进入Type and Networking(类型和连接)窗口,采用默认设置。
![](https://img-blog.csdnimg.cn/img_convert/d3de8a13d58483cf0cce2ce3584c632c.png)
在Config Type下拉文本框中选择Development Computer(开发机器)选项
8.单击Next按钮,进入Authentication Method(授权方式)窗口。这里选择第2个选项,即传统的授权方法,保留5.x版本的兼容性。
![](https://img-blog.csdnimg.cn/img_convert/5c68b526d95bc9cfbe27091f0979fcb6.png)
9.单击Next按钮,进入Accounts and Roles(账号和角色)窗口,输入两次正确的密码。
![](https://img-blog.csdnimg.cn/img_convert/c86aa624d52fc0ee8bc7fb31b5ce8c00.png)
10.单击Next按钮,进入Windows Service(Windows服务)窗口,可以设置服务器名称为MySQL。
![](https://img-blog.csdnimg.cn/img_convert/2bb705457673e669b1f242b2ce7871be.png)
11.单击Next按钮,进入Apply Configuration(确认设置服务器)窗口。
![](https://img-blog.csdnimg.cn/img_convert/c5c6d15b2482d22660ea3d36dc2d548f.png)
12.单击Execute按钮,系统自动配置MySQL服务器,配置完成后,单击Finish按钮,完成服务器配置。
![](https://img-blog.csdnimg.cn/img_convert/b152ae031a2628bc1f17391874f8711f.png)
13.登录MySQL,输入密码
![](https://img-blog.csdnimg.cn/img_convert/bf88c77ae5d5b98b70ab96e1b9eda21c.png)
14.设置MySQL新密码:打开C盘找到Program Files-MySQL-MySQL Server8.0-bin,pingCMD
按图中所示改新密码(输入mysqladmin -uroot -p原来的密码 password 新密码)。
![](https://img-blog.csdnimg.cn/img_convert/d7f099214e699814c68c8598e151b06f.png)
15.退出重启软件然后使用新密码登录
![](https://img-blog.csdnimg.cn/img_convert/d6b1356a4d7bd28f3824092240715343.png)
16.使用SQLyog登录
![](https://img-blog.csdnimg.cn/img_convert/3e712c3f63b35d757c47ea9b58d060c1.png)