回答編集履歴

1

追記

2020/04/24 06:25

投稿

CHERRY
CHERRY

スコア25171

test CHANGED
@@ -31,3 +31,37 @@
31
31
 
32
32
 
33
33
  MySQL の設定で、`default_authentication_plugin=caching_sha2_password` となっていた場合は、`default_authentication_plugin=mysql_native_password` と変更して MySQL を再起動してみてください。
34
+
35
+
36
+
37
+ ----
38
+
39
+
40
+
41
+ phpMyAdmin のドキュメントを読んでいたら PHP 7.4 以降では対応できそうな情報は見つけました。
42
+
43
+
44
+
45
+ [1.45 I get an error message about unknown authentication method caching_sha2_password when trying to log in](http://docs.phpmyadmin.net/en/latest/faq.html#i-get-an-error-message-about-unknown-authentication-method-caching-sha2-password-when-trying-to-log-in) に
46
+
47
+
48
+
49
+ > This error is because of a version compatibility problem between PHP and MySQL. The MySQL project introduced a new authentication method (our tests show this began with version 8.0.11) however PHP did not include the ability to use that authentication method. PHP reports that this was fixed in PHP version 7.4.
50
+
51
+
52
+
53
+ とあるように PHP 7.4 以降で対応されているようです。PHP 7.4 以降にアップデートできそうでしょうか?
54
+
55
+
56
+
57
+ それ以外の場合は、
58
+
59
+
60
+
61
+ > Users experiencing this are encouraged to upgrade their PHP installation, however a workaround exists. Your MySQL user account can be set to use the older authentication with a command such as
62
+
63
+ > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
64
+
65
+
66
+
67
+ とあり、やはり、MySQL 側の認証を「古い認証方式の `mysql_native_password` に変更して使ってくださいとなっています。