MySQL Connector/C++ Developer Guide  /  Installing Connector/C++ from a Binary Distribution

Chapter 3 Installing Connector/C++ from a Binary Distribution

To obtain a Connector/C++ binary distribution, visit the Connector/C++ downloads page.

For some platforms, Connector/C++ binary distributions are available in platform-specific packaging formats. Binary distributions are also available in more generic format, in the form of a compressed tar files or Zip archives.

Installation on Windows

Important

Commercial and Community Connector/C++ distributions require the Visual C++ Redistributable for Visual Studio 2017 or 2015 to work on Windows platforms. (VC++ Redistributable 2015 prior to Connector/C++ 8.0.14.) The Redistributable is available at the Microsoft Download Center; install it before installing any version of Connector/C++ that requires it.

These binary-distribution installation methods are available on Windows:

  • MySQL Installer.  The simplest and recommended method for installing Connector/C++ on Windows platforms is to download MySQL Installer and let it install and configure all the MySQL products on your system. For details, see MySQL Installer for Windows.

  • Windows MSI installer.  An MSI Installer is available for Windows (as of Connector/C++ 8.0.12). To use the MSI Installer (.msi file), launch it and follow the prompts in the screens it presents. The MSI Installer can install components for two connectors:

    • The connector for X DevAPI (including X DevAPI for C).

    • The connector for the legacy JDBC API.

    For each connector, there are two components:

    • The DLL component includes the connector DLLs and libraries to satisfy runtime dependencies. This component is required to run Connector/C++ application binaries that use the connector.

    • The Developer component includes header files, static libraries, and import libraries for DLLs. This component is required to build from source Connector/C++ applications that use the connector.

    The MSI Installer requires administrative privileges. It begins by presenting a welcome screen that enables you to continue the installation or cancel it. If you continue the installation, the MSI Installer overview screen enables you to select the type of installation to perform:

    • The Complete installation installs both components for both connectors.

    • The Typical installation installs the DLL component for both connectors.

    • The Custom installation enables you to select which components to install. Both components for the X DevAPI connector are preselected, but you can override the selection. The Developer component for a connector cannot be selected without also selecting the connector DLL component.

      The Custom installation also enables you to specify the installation location.

    For all installation types, the MSI Installer performs these actions:

    • It checks whether the required Visual C++ Redistributable for Visual Studio 2017 or 2015 is present. (VC++ Redistributable 2015 prior to Connector/C++ 8.0.14.) If not, the installer asks you to install it and exits with an error.

    • It installs documentation files: README.txt, LICENSE.txt, INFO_BIN, and INFO_SRC. (Prior to Connector/C++ 8.0.14, the information file is BUILDINFO.txt rather than INFO_BIN and INFO_SRC.)

    Important

    Prior to Connector/C++ 8.0.13, because the Microsoft Visual C++ 2017 Redistributable installer deletes the Microsoft Visual C++ 2015 Redistributable registry keys that identify its installation, standalone MySQL MSIs may fail to detect the Microsoft Visual C++ 2015 Redistributable if both it and the Microsoft Visual C++ 2017 Redistributable are installed. The solution is to repair the Microsoft Visual C++ 2017 Redistributable via the Windows Control Panel to recreate the registry keys needed for the runtime detection. Unlike the standalone MSIs, MySQL Installer for Windows contains a workaround for the detection problem.

    This workaround is no longer necessary as of Connector/C++ 8.0.13.

  • Zip archive package without installer.  To install from a Zip archive package (.zip file), see Installation Using a tar or Zip Package.

Installation on Linux

These binary-distribution installation methods are available on Linux:

  • RPM package.  RPM packages are available for Linux (as of Connector/C++ 8.0.12). The packages are distinguished by their base names (the full names include the Connector/C++ version and suffixes):

    • mysql-connector-c++: This package provides the shared connector library implementing X DevAPI and X DevAPI for C.

    • mysql-connector-c++-jdbc: This package provides the shared legacy connector library implementing the JDBC API.

    • mysql-connector-c++-devel: This package installs development files required for building applications that use Connector/C++ libraries provided by the other packages, and static connector libraries. This package depends on the shared libraries provided by the other packages. It cannot be installed by itself without the other two packages.

  • Debian package.  Debian packages are available for Linux (as of Connector/C++ 8.0.14). The packages are distinguished by their base names (the full names include the Connector/C++ version and suffixes):

    • libmysqlcppconn8-1: This package provides the shared connector library implementing X DevAPI and X DevAPI for C.

    • libmysqlcppconn7: This package provides the shared legacy connector library implementing the JDBC API.

    • libmysqlcppconn-dev: This package installs development files required for building applications that use Connector/C++ libraries provided by the other packages, and static connector libraries. This package depends on the shared libraries provided by the other packages. It cannot be installed by itself without the other two packages.

  • Compressed tar file.  To install from a compressed tar file (.tar.gz file), see Installation Using a tar or Zip Package.

Installation on macOS

These binary-distribution installation methods are available on macOS:

  • DMG package.  DMG (disk image) packages for macOS are available as of Connector/C++ 8.0.12. A DMG package provides shared and static connector libraries implementing X DevAPI and X DevAPI for C, and the legacy connector library implementing the JDBC API. The package also includes OpenSSL libraries, public header files, and license and documentation files: README, LICENSE, INFO_BIN, and INFO_SRC. (Prior to Connector/C++ 8.0.14, the information file is BUILDINFO.txt rather than INFO_BIN and INFO_SRC.)

  • Compressed tar file.  To install from a compressed tar file (.tar.gz file), see Installation Using a tar or Zip Package.

Installation on Solaris

Important

The installation packages have a dependency on the Oracle Developer Studio 12.6 Runtime Libraries, which must be installed before you run the MySQL installation package. See the download options for Oracle Developer Studio here. The installation package enables you to install the runtime libraries only instead of the full Oracle Developer Studio; see instructions in Installing Only the Runtime Libraries on Oracle Solaris 11.

These binary-distribution installation methods are available on Solaris:

Installation Using a tar or Zip Package

Connector/C++ binary distributions are available for several platforms, packaged in the form of compressed tar files or Zip archives, denoted here as PACKAGE.tar.gz or PACKAGE.zip.

To unpack a compressed tar file, use this command in the intended installation directory:

tar zxvf PACKAGE.tar.gz

To install from a Zip archive package (.zip file), use WinZip or another tool that can read .zip files to unpack the file into the location of your choosing.


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.