1、mysql 下载地址 https://dev.mysql.com/downloads/mysql/8.0.html
2、安装环境变量;
3、管理员身份打开 cmd.exe
4、进入bin目录下
执行命令:mysqld --initialize-insecure --user=mysql 在mysql-5.7.20-winx64目录下生成data目录
5、启动mysql服务 net start mysql (若报错,使用mysqld -install)
6、登录mysql,不需要输入密码,回车即可
7、登录成功后,修改密码
alter user 'root@localhost' identified by 'admin';
8、navicat链接mysql 报错 :2059 - authentication plugin 'caching_sha2_password' -navicat连接异常问题解决
原因:caching_sha2_password ,当前使用的navicat版本不支持这种格式的密码。
解决方法:
alter user 'root'@'localhost' identified with mysql_native_password by 'admin';
参考:https://www.cnblogs.com/reyinever/p/8551977.html
https://blog.youkuaiyun.com/m0_38017782/article/details/80061991