8 - Public Key Retrieval is not allowed
Problem
Start from MySQL 8, the authentication plugin is changed to "caching_sha2_password".
Therefore, phpMyAdmin or other client tools will get "Public Key Retrieval is not allowed" problem.
Solution
We changed the authentication plugin to "mysql_native_password".
If you use docker. You need do this first.
$ sudo docker exec -it docker_run_name bash
Example: $ sudo docker exec -it mysql bash
$ mysql -u root -p
mysql> use mysql
mysql> select host, user from user;
+-----------+------------------+
| host | user |
+-----------+------------------+
| % | root |
| localhost | mysql.infoschema |
| localhost | mysql.session |
| localhost | mysql.sys |
| localhost | root |
+-----------+------------------+
5 rows in set (0.00 sec)
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Your New Password';
Query OK, 0 rows affected (0.08 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
Test
Author And Source
この問題について(8 - Public Key Retrieval is not allowed), 我々は、より多くの情報をここで見つけました https://qiita.com/moonlightbox/items/5fe3d5df691b4ec53084著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .