欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

mysql8.0入坑体验

程序员文章站 2022-06-13 14:55:10
正常从官网下载,并且正常安装,直到安装完成。然后用navicate连接,发现报错信息如下所示Client does not support authentication protocol requested by server; consider upgrading MySQL clientbing ......

正常从官网下载,并且正常安装,直到安装完成。
然后用navicate连接,发现报错信息如下所示
client does not support authentication protocol requested by server; consider upgrading mysql client

bing了一下,发现 是密码加密方式不一样,然后接着更改

alter user 'root'@'%' identified with mysql_native_password by '你的密码';
alter user 'root'@'localhost' identified with mysql_native_password by '你的密码';
flush privileges;

然后查看一下用户表

mysql> select user,host,plugin from mysql.user;
+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| heima            | %         | mysql_native_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session    | localhost | caching_sha2_password |
| mysql.sys        | localhost | caching_sha2_password |
| root             | localhost | mysql_native_password |
+------------------+-----------+-----------------------+
5 rows in set (0.00 sec)

mysql8.0默认的加密方式为caching_sh2_password。修改为mysql_native_password


然后再次用navicate;连接,就能够成功了 

安装的时候,需要额外安装一下microsoft visual c++ 2015 redistributation