libboost-mysql

[brief]

MySQL client library built on top of Boost.Asio

Branch Windows/Linux Build OSX build Coverage Documentation
master Build Status Build Status codecov Docs for master
develop Build Status Build Status codecov Docs for develop

Boost.MySQL is a C++11 client for MySQL and MariaDB database servers, based on Boost.Asio. Boost.MySQL is part of Boost.

Breaking changes in Boost 1.85

Boost.MySQL now requires linking with Boost.Charconv, which is a compiled library. If you're getting link errors, link your executable to the Boost::charconv CMake target. No C++ code changes are required.

Feedback

Do you have any suggestion? Would you like to share a bad or good experience while using the library? Please comment on this issue.

Why another MySQL C++ client?

Using the library

To use this library, you need:

The library is header-only, but it depends on other Boost header-only libraries and on OpenSSL. To use the library, install Boost the way you would normally do (e.g. via b2 install), and create a CMakeLists.txt like this (replace main by your executable name and main.cpp by your list of source files):

project(boost_mysql_example LANGUAGES CXX)

find_package(Boost REQUIRED COMPONENTS charconv)
find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)

add_executable(main main.cpp)
target_link_libraries(main PRIVATE Boost::charconv Threads::Threads OpenSSL::Crypto OpenSSL::SSL)

Tested with

Boost.MySQL has been tested with the following compilers:

And with the following databases:

Features

license BSL-1.0
project boost
url github.com/boostorg/mysql
doc-url www.boost.org/doc/libs/1_87_0/libs/mysql
topics C++Boost
3 Versions
version 1.87.0
repository https://pkg.cppget.org/1/stable
depends 17; libssl, libcrypto, libboost-asio, libboost-assert, libboost-charconv, libboost-compat, libboost-config, libboost-core, libboost-describe, libboost-endian, libboost-intrusive, libboost-mp11, libboost-optional, libboost-pfr, libboost-system, libboost-throw-exception, libboost-variant2
reviews +1
version 1.85.0
repository https://pkg.cppget.org/1/stable
depends 15; libssl, libcrypto, libboost-asio, libboost-assert, libboost-charconv, libboost-config, libboost-core, libboost-describe, libboost-endian, libboost-intrusive, libboost-mp11, libboost-optional, libboost-system, libboost-throw-exception, libboost-variant2
reviews +1
version 1.83.0
repository https://pkg.cppget.org/1/stable
depends 13; libssl, libcrypto, libboost-asio, libboost-assert, libboost-config, libboost-core, libboost-describe, libboost-endian, libboost-lexical-cast, libboost-mp11, libboost-system, libboost-throw-exception, libboost-variant2
reviews +1