reference/mysqli/setup.xml
ed851c6bbc75edca2706ea43f224278dd0538a6f
...
...
@@ -11,13 +11,28 @@
11
11
In order to have these functions available, you must compile PHP with
12
12
support for the mysqli extension.
13
13
</para>
14
-
<note>
15
-
<para>
16
-
The mysqli extension is designed to work with MySQL version 4.1.13 or
17
-
newer, or 5.0.7 or newer. For previous versions, please see the <link
18
-
linkend="intro.mysql">MySQL</link> extension documentation.
19
-
</para>
20
-
</note>
14
+
15
+
<para>
16
+
<emphasis role="bold">MySQL 8</emphasis>
17
+
</para>
18
+

19
+
<para>
20
+
When running a PHP version before 7.1.16, or PHP 7.2 before 7.2.4, set
21
+
MySQL 8 Server's default password plugin to <emphasis>mysql_native_password</emphasis>
22
+
or else you will see errors similar to
23
+
<emphasis>The server requested authentication method unknown to the client [caching_sha2_password]</emphasis>
24
+
even when <emphasis>caching_sha2_password</emphasis> is not used.
25
+
</para>
26
+
<para>
27
+
This is because MySQL 8 defaults to caching_sha2_password, a plugin that is
28
+
not recognized by the older PHP (mysqlnd) releases. Instead, change it by
29
+
setting <literal>default_authentication_plugin=mysql_native_password</literal>
30
+
in <filename>my.cnf</filename>. The <emphasis>caching_sha2_password</emphasis>
31
+
plugin is fully supported as of PHP 7.4.4. For older releases, the
32
+
<link linkend="book.mysql-xdevapi">mysql_xdevapi</link> extension does
33
+
support it.
34
+
</para>
35
+

21
36
</section>
22
37
<!-- }}} -->
23
38

24
39