Name

mysql_get_proto_info —

Synopsis

unsigned int mysql_get_proto_info(MYSQL *mysql)

Returns the MySQL protocol version used in the current connection as an integer. As a general rule, the MySQL network protocol changes only between minor releases of MySQL. That is, all releases of MySQL 3.23.x should have the same protocol version number.

Example

printf("This connection is using MySQL connection protocol ver. %d\n",
        mysql_get_proto_info(  ));

Get Managing & Using MySQL, 2nd 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.