|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79638 persistent connection with mysqli log as no password
Submitted: 2020-05-26 23:36 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: radek at pinkbike dot com Assigned:
Status: Open Package: MySQLi related
PHP Version: 7.4.6 OS: debian
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:
From: radek at pinkbike dot com
New email:
PHP Version: OS:


 [2020-05-26 23:36 UTC] radek at pinkbike dot com
Mysql error log is filled with this when using a persistent connection. 
2020-05-26T23:15:40.279047Z 281924791 [Note] Access denied for user 'root'@'' (using password: NO)

The connection succeeds so I'm assuming internally there are multiple attempts to connect, one of which is without the pass. 
This error is logged in the mysql log not on the first connect, but on subsequent requests to a process with a persistent connection.  
Switching to non persistent connection ( removing the p: form host), connection also succeeds but no such error is logged.

Also reverting to php 7.1.33 with exactly the same configuration does not log the error when using persistent connection. (expected behaviour)

All test using production Server version: 5.7.28-31-log Percona Server

Test script:

$link = mysqli_connect("p:", "root", "password");

if (!$link) {
    echo "Debugging errno: " . mysqli_connect_errno();
} else {
    echo "Success";

Expected result:
No error log message in mysql.

Actual result:
2020-05-26T23:15:40.279047Z 281924791 [Note] Access denied for user 'root'@'' (using password: NO)


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 03:01:27 2024 UTC