> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_get_host_info.md).

# mysql\_get\_host\_info

## Syntax

```c
char * mysql_get_host_info(MYSQL * mysql);
```

## Parameter

* `mysql` - a mysql handle, which was previously allocated by [mysql\_init()](/docs/connectors/mariadb-connector-c/api-functions/mysql_init.md) or [mysql\_real\_connect()](/docs/connectors/mariadb-connector-c/api-functions/mysql_real_connect.md).

## Description

Describes the type of connection in use for the connection, including the server host name.

## Return Value

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

## See Also

* [mysql\_get\_server\_version()](/docs/connectors/mariadb-connector-c/api-functions/mysql_get_server_version.md)

{% @marketo/form formId="4316" %}
