diff --git a/5.5/Dockerfile b/5.5/Dockerfile index d19094d42..3feb14f85 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -1,5 +1,4 @@ FROM debian:wheezy - # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added RUN groupadd -r mysql && useradd -r -g mysql mysql @@ -39,15 +38,12 @@ ENV PATH $PATH:/usr/local/mysql/bin:/usr/local/mysql/scripts # replicate some of the way the APT package configuration works # this is only for 5.5 since it doesn't have an APT repo, and will go away when 5.5 does RUN mkdir -p /etc/mysql/conf.d \ - && { \ - echo '[mysqld]'; \ - echo '!includedir /etc/mysql/conf.d/'; \ - } > /etc/mysql/my.cnf \ && { \ echo '[mysqld]'; \ echo 'user = mysql'; \ echo 'datadir = /var/lib/mysql'; \ - } > /etc/mysql/conf.d/docker.cnf + echo '!includedir /etc/mysql/conf.d/'; \ + } > /etc/mysql/my.cnf VOLUME /var/lib/mysql diff --git a/5.5/docker-entrypoint.sh b/5.5/docker-entrypoint.sh index e3eb56941..530116619 100755 --- a/5.5/docker-entrypoint.sh +++ b/5.5/docker-entrypoint.sh @@ -79,7 +79,7 @@ if [ "$1" = 'mysqld' ]; then echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile" - mysql -uroot < "$tempSqlFile" + mysql --protocol=socket -uroot < "$tempSqlFile" rm -f "$tempSqlFile" kill $(cat $PIDFILE) diff --git a/5.6/docker-entrypoint.sh b/5.6/docker-entrypoint.sh index 10c79f470..0a69d8010 100755 --- a/5.6/docker-entrypoint.sh +++ b/5.6/docker-entrypoint.sh @@ -78,7 +78,7 @@ if [ "$1" = 'mysqld' ]; then echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile" - mysql -uroot < "$tempSqlFile" + mysql --protocol=socket -uroot < "$tempSqlFile" rm -f "$tempSqlFile" kill $(cat $PIDFILE) diff --git a/5.7/docker-entrypoint.sh b/5.7/docker-entrypoint.sh index 29ad60ea6..4942c8c05 100755 --- a/5.7/docker-entrypoint.sh +++ b/5.7/docker-entrypoint.sh @@ -78,7 +78,7 @@ if [ "$1" = 'mysqld' ]; then echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile" - mysql -uroot < "$tempSqlFile" + mysql --protocol=socket -uroot < "$tempSqlFile" rm -f "$tempSqlFile" kill $(cat $PIDFILE)