Skip to content

Commit 2e4f222

Browse files
committed
Fix a few minor issues with docker-entrypoint.sh for 8.0.11
1 parent 30bf2b7 commit 2e4f222

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

8.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ RUN set -ex; \
4444
apt-key list > /dev/null
4545

4646
ENV MYSQL_MAJOR 8.0
47-
ENV MYSQL_VERSION 8.0.4-rc-1debian9
47+
ENV MYSQL_VERSION 8.0.11-1debian9
4848

4949
RUN echo "deb http://repo.mysql.com/apt/debian/ stretch mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
5050

8.0/docker-entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ _check_config() {
5959
# latter only show values present in config files, and not server defaults
6060
_get_config() {
6161
local conf="$1"; shift
62-
"$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null | awk '$1 == "'"$conf"'" { print $2; exit }'
62+
"$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null \
63+
| awk '$1 == "'"$conf"'" && /^[^ \t]/ { sub(/^[^ \t]+[ \t]+/, ""); print; exit }'
64+
# match "datadir /some/path with/spaces in/it here" but not "--xyz=abc\n datadir (xyz)"
6365
}
6466

6567
# allow the container to be started with `--user`
@@ -143,7 +145,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
143145
-- or products like mysql-fabric won't work
144146
SET @@SESSION.SQL_LOG_BIN=0;
145147
146-
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASSWORD}') ;
148+
ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ;
147149
GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ;
148150
${rootCreate}
149151
DROP DATABASE IF EXISTS test ;

0 commit comments

Comments
 (0)