|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80344 mysqlnd support for SASL SCRAM-SHA-1 and SCRAM-SHA-256 authentication
Submitted: 2020-11-09 15:39 UTC Modified: 2020-11-09 15:39 UTC
From: Assigned: fjanisze (profile)
Status: Analyzed Package: MySQL related
PHP Version: 7.4.12 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2020-11-09 15:39 UTC]
The authentication methods SCRAM-SHA-1 and SCRAM-SHA-256 have to be supported, this issue is about adding support for them in mysqlnd.

Test script:
$link = mysqli_connect("", "user", "pass");
// Check connection
if($link === false){
    die("ERROR: Could not connect. " . mysqli_connect_error());
// Print host information
echo "Connect Successfully. Host info: " . mysqli_get_host_info($link) . PHP_EOL;

if ($result = $link->query("SHOW DATABASES")) {
  echo "Returned rows are: " . $result->num_rows . PHP_EOL;
  // Free the result set


Expected result:
Given the script and assuming that runs a mysql server configured with LDAP SASL and auth method SCRAM-SHA-1 or SCRAM-SHA-256 for the user "user", the script succeeds and the query works.

Actual result:
The connection will fail since mysqlnd is not able to authenticate, at the moment LDAP SASL is not supported in the client but the server does support those methods.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-09 15:39 UTC]
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: fjanisze
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 06:01:29 2024 UTC