---
name: "mysql_get_host_info"
section: "3"
platform: "linux"
package: "mariadb"
version: "13.0.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mysql_get_host_info"
---

# mysql\_get\_host\_info(3)

### Name

mysql\_get\_host\_info - Returns host information

### Synopsis

-

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

### 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

- •

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

### Return value

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

### See also

- •

  **[mysql\_get\_server\_version(3)](/mysql_get_server_version/3.md)**
