Opened 12 days ago
Last modified 29 hours ago
#69930 accepted enhancement
php82-mysql, php83-mysql: Add mysql8 variant
Reported by: | clouseau (John VanDyk) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | radarhere (Andrew Murray) | |
Port: | php82-mysql, php83-mysql |
Description
The php81-mysql port has a variety of variants that include mutually exclusive libraries for mariadb, mysql57, mysql8, etc. These are are listed in the "Loaded plugins" row under the mysqlnd section of phpinfo().
The php82-mysql port has only debug and universal variants. The default variant does not install the auth_plugin_caching_sha2_password,auth_plugin_sha256_password mysqlnd plugins that are installed, for example, with port install php81-mysql +mysql8.
Thus, php82 with php82-mysql on MacPorts is currently not usable with MySQL 8 default password authentication (caching_sha2_password) resulting in "The server requested authentication method unknown to the client [caching_sha2_password]".
We would be grateful if a mysql8 variant of php82-mysql could be created.
Change History (5)
comment:1 Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)
Port: | php83-mysql added |
---|---|
Status: | assigned → accepted |
Summary: | Add mysql8 variant → php82-mysql, php83-mysql: Add mysql8 variant |
comment:3 Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)
comment:4 Changed 11 days ago by clouseau (John VanDyk)
Thank you. However, with this change we are still at the point where installation results in missing plugins, so that PHP >8.1 on MacPorts does not support the default caching_sha2_password authentication method of MySQL 8.
Macports (port install php82-mysql +mysql8):
/opt/local/bin/php82 -i | grep 'Loaded plugins' Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
Homebrew (brew install shivammathur/php/php@8.2):
/opt/homebrew/bin/php -i | grep 'Loaded plugins' Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
RHEL 9.4 with PHP 8.2.13:
/usr/bin/php -i | grep 'Loaded plugins' Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
comment:5 Changed 29 hours ago by radarhere (Andrew Murray)
Cc: | radarhere added |
---|
The MacPorts php82-mysql port installs both the
mysqli
andpdo_mysql
extensions. Which one does your PHP code use?As of PHP 8.2.0alpha3, trying to configure the
mysqli
extension to use an external MySQL client library produced this error:I assumed that this also applied to
pdo_mysql
which was why I removed the MySQL variants for php82-mysql and later and forced the port to use mysqlnd—the built-in MySQL Native Driver—only.However, I now see that for
pdo_mysql
the ability to use an external MySQL client library still exists, so I should reinstate the variants for that part. That won't help, of course, if your PHP code usesmysqli
.