回答編集履歴

1

追記

2019/11/17 06:58

投稿

退会済みユーザー
test CHANGED
@@ -11,3 +11,15 @@
11
11
  「SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client」は MySQL の8系を使用したことによるメッセージなので、上記メッセージで検索してみてください。
12
12
 
13
13
  ピンポイントに Mac 用の回答をすぐに見つけられませんでしたので、参考まで。
14
+
15
+
16
+
17
+ **ちょっと雑すぎたので追記**
18
+
19
+ [MySQL Functions (PDO_MYSQL)](http://docs.php.net/manual/pl/ref.pdo-mysql.php) に以下の記述があります。
20
+
21
+ > This is because MySQL 8 defaults to caching_sha2_password, a plugin that is not recognized by the older PHP (mysqlnd) releases. Instead, change it by setting default_authentication_plugin=mysql_native_password in my.cnf. The caching_sha2_password plugin will be supported in a future PHP release. In the meantime, the mysql_xdevapi extension does support it.
22
+
23
+
24
+
25
+ MySQLi でも同様なので、php から MySQL 8 系を使用する場合は、当面 my.cnf を変更して使用することになります。