To run the examples, you need a MySQL server you can connect to. Examples
make use of a database named
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
and it has an empty password.