1、下载mysql安装包,版本自己定 ,本教程以mysql-8.0.12-winx64为例
https://dev.mysql.com/downloads/mysql/
2、解压
3、修改my.ini文件
3、进入解压后的mysql路径中的bin路径 ,按住shift 鼠标右键 在此处打开命令窗口
相关脚本:
mysqld --install
mysqld --initialize --console
alter user 'root'@'localhost' identified with mysql_native_password by '123456';
create user 'root'@'%' identified by '123456';
GRANT ALL ON *.* TO 'root'@'%';
flush privileges;