php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76243 mysql 8 - new default_authentication_plugin
Submitted: 2018-04-20 09:49 UTC Modified: 2019-12-27 15:45 UTC
Votes:212
Avg. Score:4.7 ± 0.7
Reproduced:190 of 196 (96.9%)
Same Version:117 (61.6%)
Same OS:92 (48.4%)
From: wapinet at mail dot ru Assigned: nikic (profile)
Status: Closed Package: MySQL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wapinet at mail dot ru
New email:
PHP Version: OS:

 

 [2018-04-20 09:49 UTC] wapinet at mail dot ru
Description:
------------
https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
>> For the server, the default value of the default_authentication_plugin system variable changes from mysql_native_password to caching_sha2_password. 
>>Clients that use an implementation of the client/server protocol other than libmysqlclient may need to be upgraded to a newer version that understands the new authentication plugin. For example, in PHP, MySQL connectivity usually is based on mysqlnd, which currently does not know about caching_sha2_password. Until an updated version of mysqlnd is available, the way to enable PHP clients to connect to MySQL 8.0 is to reconfigure the server to revert to mysql_native_password as the default authentication plugin, as previously discussed. 

so, need implement new default_authentication_plugin (caching_sha2_password).


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-08 11:53 UTC] likeboat at 163 dot com
caching_sha2_password is loaded on php7.2.9 .but when i upgrade to php7.2.12 recently it missing again. any plan to fix it again for next release of 7.2.x

thanks,
Billy
 [2019-01-22 17:08 UTC] virgofx at live dot com
Any updated on when caching_sha2_password PR can get merged? Also missing in the 7.3.x releases.
 [2019-09-04 12:00 UTC] m dot usama dot masood at gmail dot com
Any news on when caching_sha2_password PR can get merged? Still missing in the 7.3.x releases.
 [2019-11-07 21:37 UTC] nikic@php.net
caching_sha2_password is supported in PHP 7.4.
 [2019-12-12 12:22 UTC] sugajack2004 at gmail dot com
This is not working for me in PHP 7.4.0 after upgrading, despite what I'm reading everywhere else online. It worked fine in PHP 7.2.8 prior to me upgrading PHP. It seems like PHP is not recognizing caching_sha2_password again.

One person mentioned "possible issues" with mysqlnd in PHP 7.4.0 that could be related, but the link included from it with point 2 doesn't include the same error I have, which is the usual "authentication method unknown to the client" one.

The "possible issues" reference: https://stackoverflow.com/a/59239183

When running phpinfo(), mysqlnd also doesn't list caching_sha2_password as one of its authentication plugins, unlike mysql_native_password. Not sure if this is intentional or not, but I figured it was worth noting.
 [2019-12-27 15:45 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2019-12-27 15:45 UTC] nikic@php.net
Closing this as caching_sha2_password is in principle supported on 7.4 -- though there are a couple of different bugs that may affect it, tracked at bug #78981 and bug #79011.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC