The mysqli_get_host_info() function returns the MySQL server hostname and the connection type.
string $mysqli->host_info;
string mysqli_get_host_info ( mysqli $link )
Returns a string describing the connection represented by the link parameter (including the server host name).
The above examples will output:
Host info: Localhost via UNIX socket
Parameter | Description |
---|---|
link | Procedural style only: A link identifier returned by mysqli_connect() or mysqli_init() |
A character string representing the server hostname and the connection type.