
In the Server field, enter the IP of the database server, in the Username field - the user (in this case, it is root), in the Password field - the password of the database server root user.

To connect to PhpMyAdmin - open a browser and go to - Now we can connect the database server. We are waiting for the download of images, and deployment.ĭocker run -d -restart always -name phpmyadmin -e PMA_ARBITRARY=1 -p 8090:80 phpmyadmin Run our script (for this you need to be in the directory where our file was created. Where: phpmyadmin: name of your container image: phpmyadmin: image from which phpmyadmin will be deployed 8090:80 - port 8090 which we will use to connect to phpmyadmin restart:always - indicates that the container will be restarted when the server crashes or restarts PMA_ARBITRARY=1 - indicates that it is possible to connect to an arbitrary database server (How to bind a phpmyadmin panel to a specific server can be found in this article) Let's use the repository to create the docker-compose.yaml file at Ĭreate a docker-compose.yaml or docker-compose.yml file,

You can also use a different directory to host this and other projects. Mkdir /home/phpmyadmin & cd /home/phpmyadmin To navigate in the future where and what we have installed, let's create a separate folder for this project in the /home directory and go to it. Let's create a *.yaml file for Docker-Compose. docker-compose.Curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin /docker-compose So first create a docker-compose.yml file on your system with the following content. In this tutorial, we just use an example of Docker container for MySQL and phpMyAdmin. PhpMyAdmin is an most popular web application for managing MySQL database servers. How to Create MySQL with phpMyAdmin Docker Container Also, have configured docker-compose utility on your system.You have installed Docker service on your System.This guide assumes that you have already done the followings: In this tutorial, you will learn to launch MySQL Docker containers along with phpMyAdmin docker container using docker-compose command.

But the phpMyAdmin lovers may need the web interface for managing databases. Once you launched a MySQL container can be connect via terminal directly. In our previous tutorial, I had discussed about the keep persistent data of MySQL docker containers using Docker volumes. Docker-compose is an useful utility for managing multi-container docker applications.
