


目前只在mysql8.0中发现报 1251--Client does not support authentication protocol requested by server 错误,其他版本暂未发现
1、在远程主机的本机 使用root用户连接mysql
mysql -u root -p
备注 : mysql -u 最高权限用户名 -p 再输入密码进入

2、设置用户配置项
(1) 查看用户信息
select host,user,plugin,authentication_string from mysql.user;

备注:host为 % 表示不限制ip localhost表示本机使用 plugin非mysql_native_password 则需要修改密码
(2)修改用户密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'newpassword'; #更新一下用户的密码 root用户密码为newpassword
本次处理就只输入了如上代码即可,

三、使用navicat连接远程mysql
未配置情况为,连接拒绝

配置成功后




亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
文章评论 本文章有个评论