mysql-client
MySQL-Client Overview
Secure your stack with a hardened MySQL-Client image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.
MySQL-Client provides the mysql command-line tool for connecting to and running queries against a MySQL or MariaDB-compatible database, without needing to run or install the full database engine. This is useful for administrators and CI/CD pipelines that need to run ad hoc queries or administrative SQL against a remote database from a lightweight container — for example, a Kubernetes Job that applies a schema migration against a remote database.
Try It Out
For a quick test, print the help menu:
docker run --rm reg.mini.dev/mysql-client --helpConnect to a MySQL Server
The client needs a server to connect to, so start one on a shared network:
docker network create mysql-netdocker run -d --name mysql-server --network mysql-net \
-e MYSQL_ROOT_PASSWORD=Minimus! \
reg.mini.dev/mysqlConnect to it with the client image:
docker run --rm -it --network mysql-net \
reg.mini.dev/mysql-client -h mysql-server -u root -pSubmit the password you set when you ran the server container (in our example, Minimus!).
Ready to Interact with Your MySQL Server?
You should see the mysql> prompt of the MySQL shell. For our example, we will pass a command to list all databases:
show databases;Note that the semicolon ; marks the end of the command. If you drop it, you will see a continuation prompt (->) to add more input.
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.01 sec)Technical Considerations
The MySQL-Client image provided by Minimus is a slim, security-hardened alternative to the public image. The images are largely interchangeable, with a few differences as noted below.
MySQL-Client built by Minimus:
- Uses a fixed entrypoint of
/usr/bin/mysql— the image contains only themysqlclient binary, so pass connection flags directly as arguments (e.g.docker run reg.mini.dev/mysql-client -h <host> -u <user> -p) without naming the binary. - Drill down on the version specification tab to see the default user, volumes, environment variables, etc.
The Payoff
A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.
- See the risk reduction dashboard for a detailed CVE comparison over the past 30 days.
- Review the compliance report to see the default hardening and security configurations for the image.
Terms & Info
Trademark
This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.
Disclaimer
Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.