How to Deploy MySQL Server Docker Container

I am so interested with Docker. And currently I am exploring this Docker on my Linux box. Docker is a great solution to run multiple applications or solutions on a Linux system. It’s like to have virtual machines on a Linux host with a very small footprint or small resources. On this article, I am going to share my experience when deploying MySQL Server using Docker. By deploying MySQL Server using Docker, we can have multiple MySQL instances. With Docker, we can install Microsoft SQL Server in a matter of minutes.

I am not a Docker command line geek and I hate to do command line tasks. So, I minimalize my console task by installing Portainer. Its a great piece of software that helps to manage Docker containers via web browser. You can read my previous post to install Docker and Portainer.

portainer web console.png
Portainer Web GUI

OK, so this tutorial is entirely can be done from Portainer web GUI. So, make sure you install it first. You can read my guide on how to install Portainer on OpenSUSE or Ubuntu. Once you have Portainer, open web browser and type http://localhost:9000. Login using user and password you created during Portainer installation. Now you should be on Portainer main window as follow.

Click App Templates on the left panel to see any available docker templates. Scroll down and you should see MySQL listed there. Click it to open the configuration window.

Give a name for our new MySQL container and also provide root password to access the MySQL console.

mysql docker config.png

Scroll down and click Deploy Container to start deploying MySQL Server container with default configuration.

deploy mysql server.png

If you want to change the default port and some other settings, click Advanced Settings. In few moment, Portainer will start download and configure the MySQL Server docker. Once it completed, you will see the new container listed in Container list.

container list.png

How to Access MySQL Console

If you want to access to the MySQL Console from your network, you can do the following. Open your MySQL Container by clicking its name from the dashboard. It will open the container details as follow.

container details.jpg

Click Console at the bottom of your container details. Click Connect.

connect to console.jpg

Once you press Connect, it will open the container’s console where you can login to your MySQL Console.

login to mysql console portainer.jpg

Use the root password during the container creation process above. And you should now connected to your MySQL Console.

1 Trackback / Pingback

  1. Run MySQL Server Docker Container with Persistent Volume | Manjaro dot site

Leave a Reply