Skip to content

Commit 590e010

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Conflicts: 5.5/docker-entrypoint.sh 5.6/docker-entrypoint.sh 5.7/docker-entrypoint.sh
2 parents 95309a7 + 1f430ae commit 590e010

File tree

7 files changed

+361
-10
lines changed

7 files changed

+361
-10
lines changed

5.5/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y libaio1 && rm -rf /var/lib/apt/lists/*
1717
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
1818

1919
ENV MYSQL_MAJOR 5.5
20-
ENV MYSQL_VERSION 5.5.42
20+
ENV MYSQL_VERSION 5.5.43
2121

2222
# note: we're pulling the *.asc file from mysql.he.net instead of dev.mysql.com because the official mirror 404s that file for whatever reason - maybe it's at a different path?
2323
RUN apt-get update && apt-get install -y curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \

5.5/docker-entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ get_option () {
1010
echo $ret
1111
}
1212

13+
# if command starts with an option, prepend mysqld
1314
if [ "${1:0:1}" = '-' ]; then
1415
set -- mysqld "$@"
1516
fi
@@ -53,6 +54,10 @@ if [ "$1" = 'mysqld' ]; then
5354

5455
tempSqlFile=$(mktemp /tmp/mysql-first-time.XXXXXX.sql)
5556
cat > "$tempSqlFile" <<-EOSQL
57+
-- What's done in this file shouldn't be replicated
58+
-- or products like mysql-fabric won't work
59+
SET @@SESSION.SQL_LOG_BIN=0;
60+
5661
DELETE FROM mysql.user ;
5762
CREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ;
5863
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;

5.6/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf
1414
RUN apt-key adv --keyserver pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
1515

1616
ENV MYSQL_MAJOR 5.6
17-
ENV MYSQL_VERSION 5.6.23
17+
ENV MYSQL_VERSION 5.6.24
1818

1919
RUN echo "deb http://repo.mysql.com/apt/debian/ wheezy mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
2020

5.6/docker-entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ get_option () {
1010
echo $ret
1111
}
1212

13+
# if command starts with an option, prepend mysqld
1314
if [ "${1:0:1}" = '-' ]; then
1415
set -- mysqld "$@"
1516
fi
@@ -52,6 +53,10 @@ if [ "$1" = 'mysqld' ]; then
5253

5354
tempSqlFile=$(mktemp /tmp/mysql-first-time.XXXXXX.sql)
5455
cat > "$tempSqlFile" <<-EOSQL
56+
-- What's done in this file shouldn't be replicated
57+
-- or products like mysql-fabric won't work
58+
SET @@SESSION.SQL_LOG_BIN=0;
59+
5560
DELETE FROM mysql.user ;
5661
CREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ;
5762
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;

5.7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf
1414
RUN apt-key adv --keyserver pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
1515

1616
ENV MYSQL_MAJOR 5.7
17-
ENV MYSQL_VERSION 5.7.5-m15
17+
ENV MYSQL_VERSION 5.7.6-m16
1818

1919
RUN echo "deb http://repo.mysql.com/apt/debian/ wheezy mysql-${MYSQL_MAJOR}-dmr" > /etc/apt/sources.list.d/mysql.list
2020

5.7/docker-entrypoint.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ get_option () {
1010
echo $ret
1111
}
1212

13+
# if command starts with an option, prepend mysqld
1314
if [ "${1:0:1}" = '-' ]; then
1415
set -- mysqld "$@"
1516
fi
@@ -31,9 +32,10 @@ if [ "$1" = 'mysqld' ]; then
3132
fi
3233
chown -R mysql:mysql "$DATADIR"
3334

34-
echo 'Running mysql_install_db'
35-
mysql_install_db --user=mysql --datadir="$DATADIR" --insecure --mysqld-file=/usr/sbin/mysqld
36-
echo 'Finished mysql_install_db'
35+
echo 'Initializing database'
36+
mysqld --initialize-insecure=on --datadir="$DATADIR"
37+
echo 'Database initialized'
38+
3739
mysqld --user=mysql --datadir="$DATADIR" --skip-networking &
3840
for i in $(seq 30 -1 0); do
3941
[ -S $SOCKET ] && break
@@ -45,16 +47,16 @@ if [ "$1" = 'mysqld' ]; then
4547
exit 1
4648
fi
4749

48-
# Workaround for bug in 5.7 that doesn't clean up after itself correctly
49-
rm $DATADIR/ib_logfile0
50-
rm $DATADIR/ib_logfile1
51-
rm $DATADIR/ibdata1
5250
# These statements _must_ be on individual lines, and _must_ end with
5351
# semicolons (no line breaks or comments are permitted).
5452
# TODO proper SQL escaping on ALL the things D:
5553

5654
tempSqlFile=$(mktemp /tmp/mysql-first-time.XXXXXX.sql)
5755
cat > "$tempSqlFile" <<-EOSQL
56+
-- What's done in this file shouldn't be replicated
57+
-- or products like mysql-fabric won't work
58+
SET @@SESSION.SQL_LOG_BIN=0;
59+
5860
DELETE FROM mysql.user ;
5961
CREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ;
6062
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;

0 commit comments

Comments
 (0)