Skip to content

PHP 8.3 / MySQL 8.4 / PDO / caching_sha2_password #17182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dwilbourne opened this issue Dec 16, 2024 · 3 comments
Closed

PHP 8.3 / MySQL 8.4 / PDO / caching_sha2_password #17182

dwilbourne opened this issue Dec 16, 2024 · 3 comments

Comments

@dwilbourne
Copy link

Description

Not sure if this is implemented (yet):

Does the PDO to MySQL driver support the caching_sha2_password authentication plugin? I can see that the native mysqli works (e.g. I can connect over SSL using sha2 encrypted password), but I get an exception trying to create a PDO connection using caching_sha2_password.

PDOException : SQLSTATE[HY000] [1524] Plugin 'mysql_native_password' is not loaded.

Thanks in advance

PHP Version

PHP 8.3.12 (MySQL 8.4)

Operating System

Windows 10 - not sure if it is relevent

@cmb69
Copy link
Member

cmb69 commented Dec 16, 2024

This is a bit confusing (for me), since caching_sha2_password and mysql_native_password are supposed to be two different plugins (I don't think either relies on the other).

@SakiTakamachi
Copy link
Member

SakiTakamachi commented Dec 17, 2024

Maybe the following PR's discussion is related:
#14118

@dwilbourne
Copy link
Author

My apologies - I had not completely read the documentation. PDO/caching_sha2_password works correctly over an SSL connection. Though the options for the PDO driver are not exactly like the mysqli driver, you do need to pass options as the last argument in the construction of the connection and I had not done that. Sorry to take your time and thank you for all you do making PHP such a great environment.

@cmb69 cmb69 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants