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 das Standard Passwort-Plugin von MySQL 8 caching_sha2_password ist, ein Plugin, dass den älteren PHP (mysqlnd) Versionen nicht bekannt ist. Daher sollte also default_authentication_plugin=mysql_native_password in my.cnf konfiguriert werden. Das caching_sha2_password Plugin wird in einer zukünftigen PHP-Version unterstützt werden. In der Zwischenzeit wird es von der mysql_xdevapi Extension 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