Client does not support authentication protocol requested by server

关于由于版本号码不同而引起的 Client does not support authentication protocol requested by server 问题

搜索类似的问题,得到的答案类似于下面

mysql>SET PASSWORD FOR
'root'@'localhost' = OLD_PASSWORD('newpassword');

但是这些方法试了之后都是会提示语法的错误,如下:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'odl_password('123456')' at line 1

为此东找西找,发现了一个适用的方法:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';
FLUSH PRIVILEGES;

这样之后 ,客户端就突然连接上了服务器


共勉

猜你喜欢

转载自www.cnblogs.com/Huzr/p/9005188.html
今日推荐