解决1251 – Client does not support authentication protocol requested by server;consider upgrading…[通俗易懂]

解决1251 – Client does not support authentication protocol requested by server;consider upgrading…[通俗易懂]MySQL8.0使用Navicat连接不上,总是报错1251; 原因是MySQL8.0版本的加密方式和MySQL5.0的不一样,连接会报错。 更改加密方式 1.先通过命令行进入mysql的root账…

解决1251 - Client does not support authentication protocol requested by server;consider upgrading...

MySQL8.0使用Navicat连接不上,总是报错1251;
原因是MySQL8.0版本的加密方式和MySQL5.0的不一样,连接会报错。
解决1251 - Client does not support authentication protocol requested by server;consider upgrading...[通俗易懂]
更改加密方式
1.先通过命令行进入mysql的root账户:
mysql -u root -p

代码100分

2.更改加密方式:

代码100分mysql> ALTER USER "root"@"%" IDENTIFIED BY "password" PASSWORD EXPIRE NEVER;

3.更改密码:

mysql> ALTER USER "root"@"%" IDENTIFIED WITH mysql_native_password BY "password";

4.刷新:

代码100分mysql> FLUSH PRIVILEGES;

解决1251 - Client does not support authentication protocol requested by server;consider upgrading...[通俗易懂]

 
// 如果报错   ERROR 1396 (HY000): Operation ALTER USER failed for “root”@”%” :
则是远程访问权限不正确,先选择数据库,查看一下再更改:
mysql> use mysql;
Database changed

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

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/8548.html

(0)
上一篇 2023-02-26
下一篇 2023-02-26

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注