
You can create your own local repository, but for this example, Docker will pull the latest version from MySQL’s github page. I don’t have to download anything separately. MySQL has their own set of Docker container images on github, and I can install MySQL directly from the command line. By using a different external port number, I can install multiple MySQL instances on one server, but still use the default port for the MySQL instance. On the server-side, I will use port 3307 to connect to the default MySQL port of 3306 inside the Docker container. I already have a MySQL instance installed on my server, so I will install this new instance using a different port number than the default port of 3306. I downloaded and installed the Docker Desktop for my Mac. I am not going to cover this part, but installation is fairly straightforward. But with this tutorial, you should be able to install the Docker software and a MySQL server in less than a fifteen minutes.įirst, you will need to download and install Docker. I am not a Docker expert, so I did have to spend some time figuring out the basics.

There are third-party GUI’s available, but for this post, I am going to use a terminal window. In other words, think of a container as a virtual machine without the graphical user interface (GUI). A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. Docker is simple-to-use and allows you to run multiple containers at once.Ī container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. An easy way to setup one or multiple MySQL server deployments on a single server is to use Docker – a computer program that performs operating-system-level virtualization.
