Skip to content

Docker compose setup for a local myqsl server and a php admin containers

Notifications You must be signed in to change notification settings

javierjsa/mysql-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Simple docker compose file built as an exercise and also in order to be able to follow Complete SQL Mastery available at codewithmosh.com. First three hours of the course are available on Youtube as MySQL Tutorial for Beginners. Tested with docker version 24.0.2 and docker compose 2.18.1.

Template

Sets up a mysql container and a php-admin container in a new docker network. First time template is run, persistent volumes for both container will be created. Mysql container may take a bit longer to become available the first time. This is a very simple template lacking any security or scalability.

Usage

Deploy:

docker compose up

Tear down:

docker compose down

Default user and password:

user: root
password: 123

Connect to php-admin using a browser:

http://0.0.0.0:82

Alternatively, a db client such as Antares may be used:

Antares connection set up

Access mysql container:

docker exec -ti mysql /bin/bash

If you ever want to start from scratch, delete mysql volume:

docker volume rm mysql-volume

Credits

About

Docker compose setup for a local myqsl server and a php admin containers

Topics

Resources

Stars

Watchers

Forks