All Projects → fideloper → docker-mysql

fideloper / docker-mysql

Licence: other
A Docker container for MySQL

Programming Languages

shell
77523 projects

Docker MySQL Server

To use, edit the included build/setup.sh so it creates a database, user and password to your needs. A future update will let you define which host/ip to use when creating the user permissions.

Then, build the Docker container:

# cd into the git repository
cd /path/to/repo/docker-mysql
docker build -t mysql .    # Build a Docker image named "mysql" from this location "."
# wait for it to build...

# Run the docker container
docker run -p 3306:3306 --name mysql -d mysql /sbin/my_init --enable-insecure-key # Give container a name in case it's linked to another app container
  • docker run - starts a new docker container
    • -p 3306:3306 - Binds the local port 3306 to the container's port 3306, so a local.
    • -d mysql - Use the image tagged "mysql"
    • /sbin/my_init - Run the init scripts used to kick off long-running processes and other bootstrapping, as per phusion/baseimage-docker
    • --enable-insecure-key - Enable a generated SSL key so you can SSH into the container, again as per phusion/baseimage-docker. Generate your own SSH key for production use.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].