admin管理员组

文章数量:1566222

问题描述

问题:

        1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

翻译:
1251-客户端不支持服务器请求的身份验证协议;考虑升级MySQL客户端

解决问题

进入mysql安装目录,C:\Program Files\MySQL\MySQL Server 8.0\bin

cmd

登录mysql

mysql -u root -p

输入密码

执行以下两条命令

alter user 'root'@'localhost' identified with mysql_native_password by '1234';
flush privileges;

最后

重启mysql服务

所有操作命令

Microsoft Windows [版本 10.0.19042.1237]
(c) Microsoft Corporation。保留所有权利。

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 8.0.26 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> alter user 'root'@'localhost' identified with mysql_native_password by '1234';
Query OK, 0 rows affected (0.11 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.07 sec)

mysql>



        不是每一次努力都会有收获,但是,每一次收获都必须努力,这是一个不公平的不可逆转的命题。

本文标签: SupportauthenticationCLIENTprotocolupgrading