libboost-mysql/1.87.0

[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

version 1.87.0
license BSL-1.0Boost Software License 1.0
repository https://pkg.cppget.org/1/stable
download libboost-mysql-1.87.0.tar.gz
sha256 fe9441bb6c0be5c23f2ab793b8874ddb25c14c1ae2353ffe4052957b8b9e6909
project boost
url github.com/boostorg/mysql
doc-url www.boost.org/doc/libs/1_87_0/libs/mysql
package-url github.com/build2-packaging/boost
package-email packaging@build2.orgMailing list
topics C++Boost

Depends (17)

libssl >= 1.1.1
libcrypto >= 1.1.1
libboost-asio == 1.87.0
libboost-assert == 1.87.0
libboost-charconv == 1.87.0
libboost-compat == 1.87.0
libboost-config == 1.87.0
libboost-core == 1.87.0
libboost-describe == 1.87.0
libboost-endian == 1.87.0
libboost-intrusive == 1.87.0
libboost-mp11 == 1.87.0
libboost-optional == 1.87.0
libboost-pfr == 1.87.0
libboost-system == 1.87.0
libboost-throw-exception == 1.87.0
libboost-variant2 == 1.87.0

Reviews

fail 0
pass 1

Builds

toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.10
timestamp 2025-08-20 14:24:35 UTC (12:53:41 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.10-O2
timestamp 2025-08-20 14:22:29 UTC (12:55:47 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.10-static_O2
timestamp 2025-08-20 09:56:31 UTC (17:21:45 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_fedora_40-gcc_14-bindist
timestamp 2025-08-20 03:57:41 UTC (23:20:35 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18_libc++-static_O3
timestamp 2025-08-20 03:48:21 UTC (23:29:55 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18_libc++-O3
timestamp 2025-08-20 03:39:50 UTC (23:38:26 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18_libc++
timestamp 2025-08-20 03:36:09 UTC (23:42:07 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18-O3
timestamp 2025-08-20 03:35:53 UTC (23:42:23 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18
timestamp 2025-08-20 03:32:31 UTC (23:45:45 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18-static_O3
timestamp 2025-08-20 03:31:58 UTC (23:46:18 hours ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_17
timestamp 2025-08-19 02:06:00 UTC (02 01:12:16 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_17_libc++
timestamp 2025-08-19 02:02:25 UTC (02 01:15:51 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14-ndebug_O3
timestamp 2025-08-19 01:42:04 UTC (02 01:36:12 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14-O3
timestamp 2025-08-19 01:39:18 UTC (02 01:38:58 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14-static_O3
timestamp 2025-08-19 01:35:31 UTC (02 01:42:45 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_14
timestamp 2025-08-19 01:34:26 UTC (02 01:43:50 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-w64-mingw32
tgt config windows_10-gcc_13.2_mingw_w64-O2
timestamp 2025-08-18 23:27:58 UTC (02 03:50:18 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_14-ndebug_O3
timestamp 2025-08-18 23:26:39 UTC (02 03:51:37 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-w64-mingw32
tgt config windows_10-gcc_13.2_mingw_w64
timestamp 2025-08-18 23:19:11 UTC (02 03:59:05 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-w64-mingw32
tgt config windows_10-gcc_13.2_mingw_w64-static_O2
timestamp 2025-08-18 23:13:15 UTC (02 04:05:01 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13
timestamp 2025-08-18 22:54:32 UTC (02 04:23:44 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.8
timestamp 2025-08-18 22:14:33 UTC (02 05:03:43 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.8-O2
timestamp 2025-08-18 22:09:33 UTC (02 05:08:43 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.8-static_O2
timestamp 2025-08-18 21:59:08 UTC (02 05:19:08 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_14-O3
timestamp 2025-08-18 20:56:57 UTC (02 06:21:19 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_14-static_O3
timestamp 2025-08-18 20:50:55 UTC (02 06:27:21 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_14
timestamp 2025-08-18 20:44:32 UTC (02 06:33:44 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_18_llvm_msvc_17.10-O2
timestamp 2025-08-18 12:48:15 UTC (02 14:30:01 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_18_llvm_msvc_17.10
timestamp 2025-08-18 12:47:26 UTC (02 14:30:50 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_18_llvm_msvc_17.10-static_O2
timestamp 2025-08-18 12:44:19 UTC (02 14:33:57 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_17_msvc_msvc_17.10
timestamp 2025-08-18 12:34:02 UTC (02 14:44:14 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_12-bindist
timestamp 2025-08-18 08:14:03 UTC (02 19:04:13 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_ubuntu_24.04-gcc_13-bindist
timestamp 2025-08-18 08:08:03 UTC (02 19:10:13 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_17_libc++
timestamp 2025-08-18 07:45:17 UTC (02 19:32:59 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-freebsd14.1
tgt config freebsd_14-clang_18-O3
timestamp 2025-08-18 07:42:13 UTC (02 19:36:03 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-freebsd13.3
tgt config freebsd_13-clang_17
timestamp 2025-08-18 07:34:58 UTC (02 19:43:18 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_17
timestamp 2025-08-18 07:31:53 UTC (02 19:46:23 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-freebsd14.1
tgt config freebsd_14-clang_18-static_O3
timestamp 2025-08-18 07:29:17 UTC (02 19:48:59 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1
timestamp 2025-08-18 07:28:51 UTC (02 19:49:25 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-freebsd14.1
tgt config freebsd_14-clang_18
timestamp 2025-08-18 07:26:32 UTC (02 19:51:44 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_18
result unbuilt
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_18-O3
result unbuilt
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_18-static_O3
result unbuilt
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_18_libc++
result unbuilt
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_18_libc++-O3
result unbuilt
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_18_libc++-static_O3
result unbuilt
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_fedora_39-gcc_13-bindist
result unbuilt
toolchain public-0.17.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0
result unbuilt
toolchain public-0.17.0
target x86_64-apple-darwin23.5.0
tgt config macos_14-clang_15.0
result unbuilt
toolchain public-0.17.0
target x86_64-apple-darwin23.5.0
tgt config macos_14-clang_15.0-O3
result unbuilt
toolchain public-0.17.0
target x86_64-apple-darwin23.5.0
tgt config macos_14-clang_15.0-static_O3
result unbuilt
target x86_64-apple-darwin23.5.0
tgt config macos_14-gcc_14_homebrew
result excluded (https://github)
target x86_64-apple-darwin23.5.0
tgt config macos_14-gcc_14_homebrew-O3
result excluded (https://github)
target x86_64-apple-darwin23.5.0
tgt config macos_14-gcc_14_homebrew-static_O3
result excluded (https://github)