Skip to content

rgr-dev/docker-MySQL

Repository files navigation

Mysql database in a Docker container

Tool for create a mysql DB container.

Instructions:

If you have Docker and Docker-Composer installed go to step 3. If you want to execute the tool and the database was already loaded go to step 6.

  1. Docker and docker-compose installation. exucute:
        $ cd SETUP
        $ ./FullDockerInstall.sh
  1. IF the installation process ends successfully go to step 3. If not visite the Docker and docker-compose docs.

  2. For brand new installation, first you must copy your .sql files into /scripts folder.For ensure execution order you must put in alphabetical order.

  3. After .sql files copy into /scripts directory execute:

        $ ./cleanStart.sh
        WARNING! This will remove all local volumes not used by at least one container.
	Are you sure you want to continue? [y/N] y
	Total reclaimed space: 0B
	Creating network "docker-mysql_default" with the default driver
	Creating test-mysql ... done
	The IP of MySQL Database is : 192.168.224.2
  1. How can see, after execute the .sh command, the prompt print a message with the container IP.
    Use for connect with MySQL database

  2. If you already executed the first 5 steps just execute this .sh:

        $ ./start.sh
  1. this start.sh ignores scripts/ path without execute any .sql file.

  2. Por Stop the container execute:

       $ ./stop.sh

Database connection params

User root = root
Password = mypassword

Notas finales.

  • Make sure to stop the stop.sh.
  • Sorry for my english.

About

A docker-compose mysql instance customizable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages