This is the MySQL docker container used to run MySQL on charlesreid1.com.
You should not run this container by itself (see
but if you do, use the
This repo contains a Dockerfile and a docker-compose file for running a slightly modified stock MySQL container.
Use docker-compose and pod-charlesreid1 for an example of running a mysql docker container using docker-compose.
The pod uses an environment variable to pass in the root password to the container, so the process is automated.
This repo uses plain
TLDR: build and run the container with:
There are a few make tasks:
make buildtask - build the MediaWiki docker container
make runtask - run the MW docker container
make disk- make a docker volume for the MW container
make rm_disk- remove the docker volume for the MW container
make clean- stop the currently running mysql container
make cleanreally- stop the container and dele the data volume
Some cleanup commands:
make clean # stop running container make cleanreally # CAREFUL!!! deletes the data volume make rm_disk # CAREFUL!!! deletes the data volume
Some startup commands:
make disk # make the disk make build # re-build container make run # run container
mysql service info¶
Service: MySQL server
MySQL data is stored in
mysql_data/, bound in the
MySQL configuration file is in
(create your alternative configuration file in a directory on the host machine and then mount that directory location as /etc/mysql/conf.d inside the mysql container.)
To load and dump, run another mysql process in the same container.
The container is called
(Basically, these create a shell inside the container, and run commands to dump the database and copy the data out, or copy the data in and restore the database.)
While MySQL is a useful tool, the command line interface and SQL syntax is annoying and clunky.
To fix that, use phpMyAdmin - or better yet, use it in a docker container. See d-phpmyadmin repo for details.