下载mysql8.0
https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.40-winx64.zip
解压


改配置文件
新建data文件夹
新建my.ini

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
[mysqld]
default-time_zone = '+8:00'
basedir=D:\Software\mysql-8.0.40-winx64
datadir=D:\Software\mysql-8.0.40-winx64\data
bind-address=127.0.0.1
mysqlx-bind-address= 127.0.0.1
max_connections=200
max_connect_errors=10
character-set-server=utf8
[mysql]
default-character-set=utf8
[client]
port=3306
|
执行命令
1
2
|
cd bin
.\mysqld.exe --initialize --console
|

会出现初始密码,临时存一下
1
|
./mysqld.exe --install mysql
|
点任务栏的搜索,搜服务
打开找Mysql


连接mysql
会提示输入密码,把刚才的临时密码粘进来就行了
然后需要改密码
1
2
|
alter user 'root'@'localhost' IDENTIFIED BY '123456';
exit
|


使用图形化

点Installer
下载上安装

