Anforderungen

Um diese Erweitertung zu benutzen muss PHP mit Support für die mysqli Erweiterung compiliert werden.

MySQL 8

Bei der Verwendung von PHP vor 7.1.16 oder PHP 7.2 vor 7.2.4, ist als Standard Passwort-Plugin des MySQL 8 Servers mysql_native_password zu konfigurieren; andernfalls werden Fehlermeldungen in der Art The server requested authentication method unknown to the client [caching_sha2_password] auftreten, selbst wenn caching_sha2_password nicht verwendet wird.

Das liegt daran, dass MySQL 8 standardmäßig caching_sha2_password verwendet und dieses Plugin von den älteren PHP- (mysqlnd) Versionen nicht erkannt wird. Stattdessen muss die Voreinstellung durch den Eintrag default_authentication_plugin=mysql_native_password in der Datei my.cnf geändert werden. Das Plugin caching_sha2_password wird seit PHP 7.4.4 vollständig unterstützt. In älteren Versionen wird es von der Erweiterung mysql_xdevapi unterstützt.

add a note add a note

User Contributed Notes 2 notes

up
-7
james at jmwhite dot co dot uk
3 years ago
PHP 7.4 now supports MySQL with caching_sha2_password, although it is a bit unclear around older versions, there seems to be conflicting reports. What is the support of caching_sha2_password in PHP < 7.4?
up
-49
alvaro at demogracia dot com
5 years ago
Supported authentication methods are listed in the "Loaded plugins" row of the "mysqlnd" section in phpinfo(). Look for plugins that start with "auth_plugin_…".
To Top