...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Welcome to Boost.MySQL examples. If you are intending to run the examples, please go through the setup first.
Here is a list of available examples:
To run the examples, you need a MySQL server you can connect to. Examples make
use of a database named boost_mysql_examples
.
The server hostname and credentials (username and password) are passed to the
examples via the command line.
If you're using docker, you can use the ghcr.io/anarthal-containers/mysql8
container to simplify the process:
# If you're on a system supporting UNIX sockets. Note that /var/run/mysqld # should be empty for this to work; you can specify a different directory, if it's not > docker run -p 3306:3306 -v /var/run/mysqld:/var/run/mysqld -d ghcr.io/anarthal-containers/mysql8 # If you're on a system that does not support UNIX sockets > docker run -p 3306:3306 -d ghcr.io/anarthal-containers/mysql8 # All the required data can be loaded by running example/db_setup.sql. # If you're using the above container, the root user has a blank password > mysql -u root < example/db_setup.sql
Please note that this container is just for demonstrative purposes, and is not suitable for production.
The root MySQL user for these containers is root
and it has an empty password.