Simple Docker-Compose For Mysql-Server And PhpMyadmin

Ayi angio
1 min readJul 22, 2020

--

Photo by Markus Spiske on Unsplash

Have a nice day guys, in this article, I will explain how to configure MySQL with PHPMyAdmin using container in docker-compose.

Disclaimer

I’m so sorry this is my first article written in English if there is an incorrect grammar I apologize

Prerequisite

  • Docker Engine version 19.03.6 or newer
  • Docker Compose version 1.26.2 or newer

You must prepare the requirements before proceeding into the next steps

Steps

  • Create file docker-compose.yml
  • Create a directory for backup your DB
  • Copy-paste this config to your docker-compose.yml
docker-compose.yml

Caution

On line 9 you have to change the path of your own directory to backup your Database on step 2

On line 13 you have to define your root password for MySQL-server

  • Run this command if you are finished your config
sudo docker-compose up -d
  • Allow port 80 on your server
  • Access using your server IP address on your browser, and see what happens

Thank you for reading this article, have a nice day 😊😊😊

--

--

Ayi angio
Ayi angio

Written by Ayi angio

DevOps Engineer | Github: Ayiangio | Email: moh.harisangio@gmail.com

No responses yet