Skip to content

Commit 2e9a5c8

Browse files
committed
Merge pull request docker-library#84 from mysql/master
Specify protocol for client during init
2 parents c361883 + 245de56 commit 2e9a5c8

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

5.5/Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
FROM debian:wheezy
2-
32
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
43
RUN groupadd -r mysql && useradd -r -g mysql mysql
54

@@ -39,15 +38,12 @@ ENV PATH $PATH:/usr/local/mysql/bin:/usr/local/mysql/scripts
3938
# replicate some of the way the APT package configuration works
4039
# this is only for 5.5 since it doesn't have an APT repo, and will go away when 5.5 does
4140
RUN mkdir -p /etc/mysql/conf.d \
42-
&& { \
43-
echo '[mysqld]'; \
44-
echo '!includedir /etc/mysql/conf.d/'; \
45-
} > /etc/mysql/my.cnf \
4641
&& { \
4742
echo '[mysqld]'; \
4843
echo 'user = mysql'; \
4944
echo 'datadir = /var/lib/mysql'; \
50-
} > /etc/mysql/conf.d/docker.cnf
45+
echo '!includedir /etc/mysql/conf.d/'; \
46+
} > /etc/mysql/my.cnf
5147

5248
VOLUME /var/lib/mysql
5349

5.5/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if [ "$1" = 'mysqld' ]; then
7979

8080
echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile"
8181

82-
mysql -uroot < "$tempSqlFile"
82+
mysql --protocol=socket -uroot < "$tempSqlFile"
8383

8484
rm -f "$tempSqlFile"
8585
kill $(cat $PIDFILE)

5.6/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if [ "$1" = 'mysqld' ]; then
7878

7979
echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile"
8080

81-
mysql -uroot < "$tempSqlFile"
81+
mysql --protocol=socket -uroot < "$tempSqlFile"
8282

8383
rm -f "$tempSqlFile"
8484
kill $(cat $PIDFILE)

5.7/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if [ "$1" = 'mysqld' ]; then
7878

7979
echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile"
8080

81-
mysql -uroot < "$tempSqlFile"
81+
mysql --protocol=socket -uroot < "$tempSqlFile"
8282

8383
rm -f "$tempSqlFile"
8484
kill $(cat $PIDFILE)

0 commit comments

Comments
 (0)