解决Navicat for MySQL 连接 Mysql 出现Client does not support authentication protocol问题

按照网上的教程更改加密方式:

进入mysql:

mysql -uroot -p;

use mysql;

更改加密方式:

alter user ’root'@'localhost' identified with mysql_native_password by '123456';

但是出现ERROR 1396(HY000)错误,错误截图如下:

解决Navicat for MySQL 连接 Mysql 出现Client does not support authentication protocol问题_第1张图片

检查一下用户名:

select user host from user;

解决Navicat for MySQL 连接 Mysql 出现Client does not support authentication protocol问题_第2张图片

如果出现这个%

alter user ’root'@'%' identified with mysql_native_password by '123456';

flush privileges;

问题解决!

 

 

 

你可能感兴趣的:(数据库)