July Release Confetti
150+ New Courses, Hands‑On Labs, And
Interactive Learning Activities
Learn More

LiNUX Lab

Running MySQL Inside a Docker Container

We deploy the real environment, you take the scenario-based labs on us. Hands-on, from anywhere, at any time.

Time required: 2 Hours

Objectives

Using many of the Docker commands we have learned, we install, start, and verify a MySQL container on the underlying host system.

Overview

In this lab, we put into practice some of the Docker commands that we have learned. Using what we know, we will instantiate a Docker container running MySQL and then use a typical client to connect and verify functionality, then end the lab by stopping and deleting the container instance.

Scenarios

1. Install Docker and configure the service so that it is running.
2. Pull the MySQL Docker container from Docker Hub.
3. Instantiate a container from that image, called 'test1-mysql', check the MySQL documentation from the Docker Hub instance to be sure it is started with the necessary parameters.
4. Verify the container is running using the appropriate Docker commands.
5. Note the IP address of the container using the appropriate Docker commands.
6. Install the MySQL client on the underlying host system (lab server).
7. Connect to the MySQL container instance via the MySQL client and log in.
8. List the databases in the container using the MySQL client to verify functionality.
9. Stop the container instance, and verify it has stopped.
10. Delete the MySQL container completely from the host system.
11. List all stopped containers to verify it has been removed.

Share our Labs
Start Your Free Trial

We have the longest and most in depth courses about cloud and engineering topics on the web. All of our training content is included with every membership.