Websocket 2006 mysql sunucusu gitti

Kod örnekleri

1
0

websocket 2006 MySQL sunucusu gitti

Opened connection from mysql client to the database is not intended to be open for several hours. 
After some time the client disconnects.
Technically, when making a WebSocket request, we can do mysqli::ping - ping the connection to the server or try to reconnect if the connection is lost.

$mysqli = new mysqli("localhost", "my_user", "my_password", "world");

/* check connection */
if ($mysqli->connect_errno) {
    printf("Connect failed: %s\n", $mysqli->connect_error);
    exit();
}

/* check if server is alive */
if ($mysqli->ping()) {
    printf ("Our connection is ok!\n");
} else {
    printf ("Error: %s\n", $mysqli->error);
}

/* close connection */
$mysqli->close();

İlgili sayfalar

Örneklerle ilgili sayfalar

Diğer dillerde

Bu sayfa diğer dillerde

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................