Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.5Mb
PDF (A4) - 35.5Mb
PDF (RPM) - 34.5Mb
EPUB - 8.7Mb
HTML Download (TGZ) - 8.5Mb
HTML Download (Zip) - 8.5Mb
HTML Download (RPM) - 7.3Mb
Eclipse Doc Plugin (TGZ) - 9.3Mb
Eclipse Doc Plugin (Zip) - 11.5Mb
Man Pages (TGZ) - 201.6Kb
Man Pages (Zip) - 306.9Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  C API Server and Client Library Versions

25.8.4.5 C API Server and Client Library Versions

The string and numeric forms of the MySQL server version are available at compile time as the values of the MYSQL_SERVER_VERSION and MYSQL_VERSION_ID macros, and at runtime as the values of the mysql_get_server_info() and mysql_get_server_version() functions.

As of MySQL 5.7.4 and Connector/C 6.1.3, the MySQL client library version depends on the type of distribution that provides the library:

  • For MySQL distributions, the client library version is the MySQL version. The string and numeric forms of this version are available at compile time as the values of the MYSQL_SERVER_VERSION and MYSQL_VERSION_ID macros, and at runtime as the values of the mysql_get_client_info() and mysql_get_client_version() functions.

    The LIBMYSQL_VERSION and LIBMYSQL_VERSION_ID macros have the same values as MYSQL_SERVER_VERSION and MYSQL_VERSION_ID and the two sets of macros can be used interchangeably.

  • For Connector/C distributions, the client library version is the Connector/C version. The string and numeric forms of this version are available at compile time as the values of the LIBMYSQL_VERSION and LIBMYSQL_VERSION_ID macros, and at runtime as the values of the mysql_get_client_info() and mysql_get_client_version() functions.

    The MYSQL_SERVER_VERSION and MYSQL_VERSION_ID macros indicate the string and numeric forms of the MySQL version on which the Connector/C distribution is based.

Prior to MySQL 5.7.4 and Connector/C 6.1.3, the client library version is the MySQL version. For Connector/C, this is the MySQL version on which the Connector/C distribution is based. The string and numeric forms of this version are available at compile time as the values of the MYSQL_SERVER_VERSION and MYSQL_VERSION_ID macros, and at runtime as the values of the mysql_get_client_info() and mysql_get_client_version() functions.

The LIBMYSQL_VERSION and LIBMYSQL_VERSION_ID macros are not defined before MySQL 5.7.4 and Connector/C 6.1.3.


User Comments
Sign Up Login You must be logged in to post a comment.