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 compressed tar files or Zip archives.
Generic Linux packages do not contain Connector/C++ static libraries. If you intend to link your application to a static library, consider installing a package that is specific to the platform on which you build your final application.
For descriptions here that refer to documentation files, those files
have names such as CONTRIBUTING.md
,
README.md
, README.txt
,
README
, LICENSE.txt
,
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
.)
Installation on Windows
On Windows platforms, Commercial and Community Connector/C++ distributions require the Visual C++ Redistributable for Visual Studio. The Redistributable is available at the Visual Studio Download Center; install it before installing Connector/C++. For information about which VC++ Redistributable versions are acceptable, see Platform Support and Prerequisites.
These methods of installing binary distributions are available on Windows:
Windows MSI Installer. As of Connector/C++ 8.0.12, an MSI Installer is available for Windows. 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 these 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. The DLL 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. The Developer 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 the DLL and Developer components for both connectors.
The Typical installation installs the DLL component for both connectors.
The Custom installation enables you to specify the installation location and select which components to install. The DLL and Developer 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 MSI Installer performs these actions:
It checks whether the required Visual C++ Redistributable for Visual Studio is present. If not, the installer asks you to install it and exits with an error. For information about which VC++ Redistributable versions are acceptable, see Platform Support and Prerequisites.
It installs documentation files.
To install Connector/C++ from the command line in batch mode, use a command similar to:
msiexec.exe /i packages\mysql-connector-cpp-commercial-8.X.X-winx64.msi /qn /lvx* msi_install.log ALLUSERS=1 INSTALLDIR=C:\tmp\c-cpp-unpacked INSTALLLEVEL=4
To uninstall Connector/C++ from the command line in batch mode, use a command similar to:
msiexec.exe /x packages\mysql-connector-cpp-commercial-8.X.X-winx64.msi /qn /lvx* msi_uninstall.log
Zip archive package without installer. To install from a Zip archive package (
.zip
file), see Installation Using a tar or Zip Package.In addition to the standard Zip archive packages, packages are available that were built in debug mode. However, applications should use the same build mode as Connector/C++. If you install Connector/C++ packages built in debug mode, build applications in debug mode. If you install Connector/C++ packages built in release mode, build applications in release mode.
Installation on Linux
These methods of installing binary distributions 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 methods of installing binary distributions 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 documentation files.
Compressed tar file. To install from a compressed tar file (
.tar.gz
file), see Installation Using a tar or Zip Package.
Installation on Solaris
These methods of installing binary distributions are available on Solaris:
Compressed tar file. To install from a compressed tar file (
.tar.gz
file), see Installation Using a tar or Zip Package.
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
or
PACKAGE
.tar.gz
.
PACKAGE
.zip
Generic Linux packages do not contain Connector/C++ static libraries.
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.