Specify host for client login during init to ignore MYSQL_HOST value#222
Merged
yosifkit merged 1 commit intodocker-library:masterfrom Oct 24, 2016
Merged
Specify host for client login during init to ignore MYSQL_HOST value#222yosifkit merged 1 commit intodocker-library:masterfrom
yosifkit merged 1 commit intodocker-library:masterfrom
Conversation
When the server is started up during initialization, it will only allow access through the localhost socket interface. The entrypoint script logs in and changes the root user to allow remote access, but if the MYSQL_HOST environment variable is defined it will be used by the client, causing the script's login to fail if it is set to anything other than localhost. Adding a -hlocalhost to the client login during init makes it ignore the environment variable.
Collaborator
Author
|
Note that MYSQL_HOST overriding --socket=protocol is a bug in the server: https://bugs.mysql.com/bug.php?id=31832 |
yosifkit
approved these changes
Oct 24, 2016
tianon
added a commit
to infosiftr/stackbrew
that referenced
this pull request
Oct 27, 2016
- `buildpack-deps`: add `libgdbm-dev` (docker-library/buildpack-deps#49) - `celery`: 4.0.0rc6 - `docker`: 1.12.3 - `java`: switch from `httpredir.debian.org` to `deb.debian.org` - `kibana`: remove obsolete comments - `mysql`: add `-hlocalhost` during init to avoid `MYSQL_HOST` interference (docker-library/mysql#222) - `openjdk`: switch from `httpredir.debian.org` to `deb.debian.org` - `percona`: 5.7.15-9-1.jessie - `php`: 7.1.0RC5 - `piwik`: 2.17.0 - `postgres`: 9.1.24-1.pgdg80+1, 9.2.19-1.pgdg80+1, 9.3.15-1.pgdg80+1, 9.4.10-1.pgdg80+1, 9.5.5-1.pgdg80+1, 9.6.1-1.pgdg80+1 - `python`: add `gdbm-dev` to `slim` and `alpine` (docker-library/python#153) - `redis`: 3.2.5 - `rocket.chat`: 0.44.0 - `ruby`: bundler 1.13.6 - `tomcat`: switch from `httpredir.debian.org` to `deb.debian.org`
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.
When the server is started up during initialization, it will only allow access
through the localhost socket interface. The entrypoint script logs in and changes
the root user to allow remote access, but if the MYSQL_HOST environment variable is
defined it will be used by the client, causing the script's login to fail if it
is set to anything other than localhost.
Adding a -hlocalhost to the client login during init makes it ignore the environment variable.
This should prevent problems as seen in issue #216