mysql_get_host_info([link_identifier])

Description: Returns a string that specifies the hostname and the type of connection in use with the connection given by link_identifier.

If link_identifier is not specified, the last opened connection is assumed.

Example:

echo mysql_get_host_info();

returns Localhost via UNIX socket.

See also: mysql_get_client_info(), mysql_get_proto_info(), mysql_get_server_info()

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.