-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Description
Please answer these questions before submitting your issue.
- What did you do? If possible, provide a simple script for reproducing the error.
go(function () {
$config = Config::get('database.connections.mysql');
$db = new MySQL();
$server = array(
'host' => $config['host'],
'port' => $config['port'],
'user' => $config['username'],
'password' => $config['password'],
'database' => $config['database'],
);
echo "connect\n";
$ret1 = $db->connect($server);
var_dump($ret1);
echo "prepare [1]\n";
$stmt1 = $db->prepare('SELECT * FROM users WHERE id=?', 5);
var_dump($stmt1);
if ($stmt1 == false)
{
var_dump($db->errno, $db->error);
}
});
-
What did you expect to see?
A positive result prepare -
What did you see instead?
connect
bool(true)
prepare [1]
bool(false)
int(2006)
string(77) "SQLSTATE[HY000] [2006] MySQL server has gone away due to Connection timed out" -
What version of Swoole are you using (show your
php --ri swoole
)?
PHP | 7.4.33 |
Swoole | 4.8.13 | -
What is your machine environment used (show your
uname -a
&php -v
&gcc -v
) ?
Linux
Metadata
Metadata
Assignees
Labels
No labels