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.
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.
Scroll down and click Deploy Container to start deploying MySQL Server container with default configuration.
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.
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.
Click Console at the bottom of your container details. Click Connect.
Once you press Connect, it will open the container’s console where you can login to your MySQL Console.
Use the root password during the container creation process above. And you should now connected to your MySQL Console.