1 下载地址
https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-8.0/mysql-8.0.21-winx64.zip
2 解压
E:\program\mysql-8.0.21-winx64
3 环境变量
path增加E:\program\mysql-8.0.21-winx64\bin\
4 CMD命令
C:\Users\Administrator> mysqld --initialize-insecure
C:\Users\Administrator> mysqld install
C:\Users\Administrator> net start mysql
C:\Users\Administrator> mysql -uroot
5 mysql命令
mysq> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER;
mysq> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
mysq> FLUSH PRIVILEGES;
mysq> exit;
网友评论