Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify host for client login during init to ignore MYSQL_HOST value #222

Merged
merged 1 commit into from
Oct 24, 2016

Conversation

ltangvald
Copy link
Collaborator

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

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.
@ltangvald
Copy link
Collaborator Author

Note that MYSQL_HOST overriding --socket=protocol is a bug in the server: https://bugs.mysql.com/bug.php?id=31832

@yosifkit yosifkit merged commit b2b4fcf into docker-library:master 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants