Navicat接続mysql 8.0.1リリースでは、1251-client does not support authentication protocol requested by serverの解決が表示されます.

2422 ワード

転載先:https://blog.csdn.net/XDMFC/article/details/80263215
せっかくmysqlをインストールしたのに、mysqlクライアントのバージョンが低すぎるという問題が発生しました.参考にしたこのブログによると、この問題は完璧に解決された.
1、コマンドラインで解凍したmysqlルートの下に入ります.
2、データベースへの登録
mysql -uroot -p

3、rootのパスワードを再入力:
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
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>

4、暗号化方式を変更する:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

5、パスワードの変更:この例の123は新しいパスワードである
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';

6、リフレッシュ:
mysql> FLUSH PRIVILEGES;

このステップが完了した後、私はすでに問題を解決することに成功しました.報告が間違っている場合は、次の7番目のステップを参照してください.ブロガーは依然として解決策を提供しています.
7、
//エラーERROR 1396(HY 000):Operation ALTER USER failed for'root'@'%':
リモート・アクセス権限が正しくありません.まずデータベースを選択し、確認してから変更します.
?
1
2
3
4
5
6
7
8
9
10
11
12
13 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)

最後に、参考にしてくださったこのブロガーに感謝します.今回の転載はもっと多くの人を助けたいだけで、結局隅でこの案を見つけるのは容易ではありません.転載したい人がいたら、元ブロガーを明記してください.ありがとうございます.