mysql\_get\_host\_info(3) MariaDB Connector/C mysql\_get\_host\_info(3)

## [Name](#Name)

mysql\_get\_host\_info - Returns host information

## [Synopsis](#Synopsis)

```
#include <mysql.h>
const char * mysql_get_host_info(MYSQL * mysql);
    
```

## [Description](#Description)

Describes the type of connection in use for the connection, including the server host name. Returns a string, or NULL if the connection is not valid.

## [Parameter](#Parameter)

•

mysql - a connection identifier, which was previously allocated by [**mysql\_init(3)**](/man/os/mariadb-13.1/mysql_init.3) and connected by [**mysql\_real\_connect(3)**](/man/os/mariadb-13.1/mysql_real_connect.3).

## [Return value](#Return_value)

Returns a string, describing host information or NULL if the connection is not valid.

## [See also](#See_also)

•

[**mysql\_get\_server\_version(3)**](/man/os/mariadb-13.1/mysql_get_server_version.3)

Version 3.4

---

Document: mysql_get_host_info(3) from mariadb-13.1 13.1.1-r1 (Chainguard OS)
