Jaystrong 2020-03-23
https://www.jianshu.com/p/647a596cb251
https://blog.csdn.net/weixin_43843797/article/details/86358226
https://dev.mysql.com/downloads/
选择MySQL Community Server
下载Windows (x86, 64-bit), ZIP Archive,解压(路径示例:D:\Program Files\mysql-8.0.19-winx64)
mysql根目录下创建my.ini 内容如下:
[mysql]
default-character-set=utf8
[mysqld]
port = 3306
basedir=D:\Program Files\mysql-8.0.19-winx64
datadir=D:\Program Files\mysql-8.0.19-winx64\data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
注意保存编码为ansi
添加环境变量
变量名:MYSQL_HOME
变量值:D:\Program Files\mysql-8.0.19-winx64
再在Path中添加: D:\Program Files\mysql-8.0.19-winx64\bin
去cmd输入
D:
cd D:\Program Files\mysql-8.0.19-winx64\bin
mysqld --initialize --console
显示:
得到临时密码 %f)!F<gyG6hW
安装mysql服务
mysqld --install
启动mysql服务
net start mysql
登陆mysql
mysql -uroot -p
输入密码
修改密码
ALTER USER IDENTIFIED BY ‘123456‘;