Bug #81055 [Com]: $mysqli->real_connect connecting to socket exception

From: Date: Wed, 14 Dec 2022 08:45:51 +0000
Subject: Bug #81055 [Com]: $mysqli->real_connect connecting to socket exception
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243140@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81055&edit=1

 ID:                 81055
 Comment by:         Redick121ouise at gmail dot com
 Reported by:        ivsucic at fesb dot hr
 Summary:            $mysqli->real_connect connecting to socket exception
 Status:             Open
 Type:               Bug
 Package:            MySQL related
 Operating System:   wsl2 debian
 PHP Version:        7.4Git-2021-05-19 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

Object-oriented style

public mysqli::real_connect(
    string $host = ?,
    string $username = ?,
    string $passwd = ?,
    string $dbname = ?,
    int $port = ?,
    string $socket = ?,
    int $flags = ?
): bool
Procedural style

mysqli_real_connect(
    mysqli $link,
    string $host = ?,
    string $username = ?,
    string $passwd = ?,
    string $dbname = ?,
    int $port = ?,
    string $socket = ?,
    int $flags = ?
): bool

Thanks, (https://www.aetnamedicare.us/)github.com


Previous Comments:
------------------------------------------------------------------------
[2021-05-22 21:33:31] cmb@php.net

Thanks for providing further info!

I'll leave this ticket for someone else more used to connecting to
a MySQL server via Unix sockets.

------------------------------------------------------------------------
[2021-05-21 20:50:45] ivsucic at fesb dot hr

I am using mysql 8. I can connect via tcp/ip

------------------------------------------------------------------------
[2021-05-21 16:00:01] cmb@php.net

Thanks for the info!  With "server version" I meant the version of
MySQL (if it's even MySQL and not MariaDB or such).

Anyhow, if you can connect with phpmyadmin, the MySQL server is
probably irrelevant.  Maybe there are issues with unix sockets
under WSL2?  Can you connect via TCP/IP with mysqli?

------------------------------------------------------------------------
[2021-05-21 15:45:48] ivsucic at fesb dot hr

Are both client and server running on WSL2?
Yes, both are running on wsl2.
What is your Client API library version (see phpinfo)?
mysqlnd 7.4.15
Can you connect via mysqli?
Using phpmyadmin with password authentication works.
What's your server version?
Apache 2.0 Handler

------------------------------------------------------------------------
[2021-05-21 14:00:04] cmb@php.net

Are both client and server running on WSL2?
What is your Client API library version (see phpinfo)?
Can you connect via mysqli?
What's your server version?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=81055


--
Edit this bug report at https://bugs.php.net/bug.php?id=81055&edit=1


Thread (7 messages)

« previous php.bugs (#243140) next »