首先是mysql安装
参照https://www.runoob.com/mysql/mysql-install.html
进行,注意改密码用set password for root@localhost='123456';
(123456是新密码)
为了方便操作,安装Navicat,连接mysql时报错,报错如下
2059 - authentication plugin 'caching_sha2_password
用命令行进入mysql,比如我是cd c:\\user\\lab\\mysql\\bin;
+mysql -u root -p;
+123456
(此处为修改后密码);然后ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
即可,再用navicat后连接正常
参考https://jingyan.baidu.com/article/0aa22375e7966ac8cc0d64b3.html