I have followed the instruction in https://registry.hub.docker.com/_/mysql/ to pull an image and running a container in which it runs a MySQL server.
The container is run
docker exec -i some_mysql_container mysql -uroot -ppassword <<< "select database();"