libboost-mysql/1.85.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.85.0
license BSL-1.0Boost Software License 1.0
repository https://pkg.cppget.org/1/stable
download libboost-mysql-1.85.0.tar.gz
sha256 adfd98e2677da04abfde872e2d10aeb458776fca95f61d073d8a3b0e319d2918
project boost
url github.com/boostorg/mysql
doc-url www.boost.org/doc/libs/1_85_0/libs/mysql
package-url github.com/build2-packaging/boost
package-email packaging@build2.orgMailing list
topics C++Boost

Depends (15)

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

Reviews

fail 0
pass 1

Builds

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-20 13:14:44 UTC (12:10:00 hours 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-O2
timestamp 2025-08-20 13:14:37 UTC (12:10:08 hours 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-20 13:13:56 UTC (12:10:49 hours 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-20 12:50:39 UTC (12:34:05 hours ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_fedora_40-gcc_14-bindist
timestamp 2025-08-19 21:59:32 UTC (01 03:25:13 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 18:58:27 UTC (01 06:26:17 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 18:57:25 UTC (01 06:27:20 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 18:56:51 UTC (01 06:27:54 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 18:55:46 UTC (01 06:28:59 days 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-19 11:13:21 UTC (01 14:11:24 days 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-19 11:13:10 UTC (01 14:11:35 days 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-19 11:09:42 UTC (01 14:15:02 days 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-19 11:07:20 UTC (01 14:17:25 days 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-19 11:07:02 UTC (01 14:17:43 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_18
timestamp 2025-08-19 11:06:30 UTC (01 14:18:15 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-19 08:43:21 UTC (01 16:41:23 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_12-bindist
timestamp 2025-08-19 08:22:53 UTC (01 17:01:51 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-19 07:35:52 UTC (01 17:48:52 days 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-19 07:26:55 UTC (01 17:57: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-19 07:24:22 UTC (01 18:00:22 days ago)
result success | log | rebuild
toolchain public-0.17.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.10
timestamp 2025-08-19 07:19:15 UTC (01 18:05:30 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-19 07:17:13 UTC (01 18:07:31 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-19 07:10:08 UTC (01 18:14: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-static_O2
timestamp 2025-08-19 07:05:37 UTC (01 18:19:07 days 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-19 07:02:57 UTC (01 18:21:48 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-19 07:00:53 UTC (01 18:23:52 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-19 06:53:23 UTC (01 18:31:21 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-19 06:50:01 UTC (01 18:34: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
timestamp 2025-08-19 06:35:17 UTC (01 18:49:27 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-19 06:26:12 UTC (01 18:58:33 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-19 06:11:31 UTC (01 19:13:14 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-19 06:06:13 UTC (01 19:18:32 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-19 06:04:58 UTC (01 19:19:47 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-19 06:00:25 UTC (01 19:24:20 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-19 05:59:53 UTC (01 19:24:51 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-19 05:54:20 UTC (01 19:30:25 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-19 05:50:09 UTC (01 19:34:36 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-18 07:43:40 UTC (02 17:41:04 days ago)
result success | log | rebuild
toolchain public-0.17.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_17
timestamp 2025-08-18 07:37:17 UTC (02 17:47:27 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 07:18:16 UTC (02 18:06:29 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)