[basics] Add instructions for using MySQL from a Docker container#48
Open
[basics] Add instructions for using MySQL from a Docker container#48
Conversation
filmaj
suggested changes
Oct 26, 2018
Contributor
filmaj
left a comment
There was a problem hiding this comment.
Nice, thanks!
If you can tweak which mysql docker image to use, as per my suggestion, then you can remove the last paragraph as well (and make the instructions simpler).
Thanks for putting this together!
| If you're not lucky enough to work on a Debian derivatave, check for installation instructions for MariaDB or MySQL in your system. Or give a try to a preinstalled Docker container. For example, you can run MySQL from a container as: | ||
|
|
||
| ``` | ||
| docker run --env MYSQL_ALLOW_EMPTY_PASSWORD=1 --env MYSQL_ROOT_PASSWORD="" -p 3306:3306 -d mysql/mysql-server:latest |
Contributor
There was a problem hiding this comment.
Suggested change
| docker run --env MYSQL_ALLOW_EMPTY_PASSWORD=1 --env MYSQL_ROOT_PASSWORD="" -p 3306:3306 -d mysql/mysql-server:latest | |
| docker run -d -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql |
With the above suggested change, you can also remove everything about creating a new root user, connecting to the running docker, etc - much simpler! Here are the two docker commands I use to spin up the various infrastructural bits for running tests for grimoirelab programs:
docker run -d -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql
docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following advice by @filmaj in #36.