Skip to content

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

Merged
yosifkit merged 1 commit intodocker-library:masterfrom
mysql:master
Oct 24, 2016
Merged

Specify host for client login during init to ignore MYSQL_HOST value#222
yosifkit merged 1 commit intodocker-library:masterfrom
mysql:master

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