---
name: "mysql_get_proto_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_proto_info"
---

# mysql\_get\_proto\_info(3)

### Name

mysql\_get\_proto\_info - Returns protocol version number

### Synopsis

-

  ```
  #include <mysql.h>
  unsigned int mysql_get_proto_info(MYSQL * mysql);
  ```

### Description

Returns the protocol version number for the specified connection

### 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)**.

### Notes

MariaDB Connector/C doesn’t support protocol version 9 and prior.

### Return value

The protocol version number in use

### See also

- •

  **[mysql\_get\_host\_info(3)](/mysql_get_host_info/3.md)**
