Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  mysql_get_server_version() mysql_get_server_version()

unsigned long mysql_get_server_version(MYSQL *mysql)


Returns an integer that represents the MySQL server version. The value has the format XYYZZ where X is the major version, YY is the release level (or minor version), and ZZ is the sub-version within the release level:

major_version*10000 + release_level*100 + sub_version

For example, "5.7.11" is returned as 50711.

This function is useful in client programs for determining whether some version-specific server capability exists.

Return Values

An integer that represents the MySQL server version.



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