MySQL Connector/C++ Developer Guide  /  Installing Connector/C++ from Source  /  Source Installation System Prerequisites

4.1 Source Installation System Prerequisites

To install Connector/C++ from source, the following system requirements must be satisfied:

Build Tools

You must have the cross-platform build tool CMake (2.8.12 or higher).

You must have a C++ compiler that supports C++11.

MySQL Client Library

To build Connector/C++ from source, the MySQL C API client library may be required:

  • Building the JDBC connector requires a client library from MySQL 5.7 (5.7.9 or higher) or MySQL 8.0 (8.0.11 or higher). This occurs when Connector/C++ is configured with the WITH_JDBC CMake option enabled to include the JDBC connector.

  • For Connector/C++ built without the JDBC connector, the client library is not needed.

Typically, the MySQL client library is installed when MySQL is installed. However, check your operating system documentation for other installation options.

To specify where to find the client library, set the MYSQL_DIR CMake option appropriately at configuration time as necessary (see Section 4.4, “Connector/C++ Source-Configuration Options”).

Boost C++ Libraries

To compile Connector/C++ the Boost C++ libraries are needed only if you build the legacy JDBC API or if the version of the C++ standard library on your system does not implement the UTF8 converter (codecvt_utf8).

If the Boost C++ libraries are needed, Boost 1.59.0 or newer must be installed. To obtain Boost and its installation instructions, visit the official Boost site.

After Boost is installed, use the WITH_BOOST CMake option to indicate where the Boost files are located (see Section 4.4, “Connector/C++ Source-Configuration Options”):

cmake [other_options] -DWITH_BOOST=/usr/local/boost_1_59_0

Adjust the path as necessary to match your installation.

SSL Support

Use the WITH_SSL CMake option to specify which SSL library to use when compiling Connector/C++. These SSL library choices are available:

  • As of Connector/C++ 8.0.12: Connector/C++ can be compiled using OpenSSL or wolfSSL. The default is OpenSSL.

  • Prior to Connector/C++ 8.0.12: Connector/C++ can be compiled using OpenSSL or yaSSL. The default is yaSSL.

If you compile Connector/C++ using OpenSSL, OpenSSL 1.0.x is required.

To compile Connector/C++ using wolfSSL, you must download the wolfSSL source code to your system. To obtain it, visit https://www.wolfssl.com. Connector/C++ requires wolfSSL 3.14.0 or higher. Also, because wolfSSL uses TLSv1.2 by default, SSL connections from Connector/C++ applications to MySQL servers that do not support TLSv1.2 are not supported. For example, MySQL 5.7 Community distributions are compiled using yaSSL, which does not support TLSv1.2. This means that MySQL 5.7 Community servers cannot be used with Connector/C++ built using wolfSSL.

For more information about WITH_SSL and SSL libraries, see Section 4.4, “Connector/C++ Source-Configuration Options”.


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.