[bitnami/mysql] Release 8.0.33-debian-11-r20 (#37402)

* [bitnami/mysql] Release 8.0.33-debian-11-r20

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* [bitnami/mysql] Update goss tests

Signed-off-by: Gonzalo Gomez Gracia <gonzalog@vmware.com>

---------

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Gonzalo Gomez Gracia <gonzalog@vmware.com>
Co-authored-by: Gonzalo Gomez Gracia <gonzalog@vmware.com>
This commit is contained in:
Bitnami Bot
2023-06-13 09:38:52 +02:00
committed by GitHub
parent d0c5668c94
commit 6015b90428
5 changed files with 28 additions and 7 deletions

View File

@@ -8,4 +8,4 @@ file:
/opt/bitnami/mysql/logs/mysqld.log:
exists: true
filetype: symlink
linked-to: /dev/stdout
linked-to: /proc/1/fd/1

View File

@@ -3,10 +3,10 @@ FROM docker.io/bitnami/minideb:bullseye
ARG TARGETARCH
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \
org.opencontainers.image.created="2023-06-12T06:48:37Z" \
org.opencontainers.image.created="2023-06-12T17:38:15Z" \
org.opencontainers.image.description="Application packaged by VMware, Inc" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="8.0.33-debian-11-r19" \
org.opencontainers.image.ref.name="8.0.33-debian-11-r20" \
org.opencontainers.image.title="mysql" \
org.opencontainers.image.vendor="VMware, Inc." \
org.opencontainers.image.version="8.0.33"

View File

@@ -158,11 +158,11 @@ max_allowed_packet=16M
bind_address=${DB_DEFAULT_BIND_ADDRESS}
log_error=${DB_LOGS_DIR}/mysqld.log
slow_query_log=${DB_ENABLE_SLOW_QUERY}
slow_query_log_file=${DB_LOGS_DIR}/mysqld.log
long_query_time=${DB_LONG_QUERY_TIME}
character_set_server=${DB_DEFAULT_CHARACTER_SET}
collation_server=${DB_DEFAULT_COLLATE}
plugin_dir=${DB_BASE_DIR}/lib/plugin
datadir=${DB_DATA_DIR}
[client]
port=${DB_DEFAULT_PORT_NUMBER}

View File

@@ -24,5 +24,5 @@ for dir in "$DB_TMP_DIR" "$DB_LOGS_DIR" "$DB_CONF_DIR" "${DB_CONF_DIR}/bitnami"
chmod -R g+rwX "$dir"
done
# Redirect all logging to stdout
ln -sf /dev/stdout "$DB_LOGS_DIR/mysqld.log"
# Redirect logging to PID 1's stdout file descriptor including database initialization logs
ln -sf /proc/1/fd/1 "$DB_LOGS_DIR/mysqld.log"

View File

@@ -524,11 +524,32 @@ You can configure the containers [logging driver](https://docs.docker.com/engine
### Slow query logs
By default MySQL doesn't enable [slow query log](https://dev.mysql.com/doc/refman/8.0/en/slow-query-log.html) to record the SQL queries that take a long time to perform. You can modify these settings using the following environment variables:
By default MySQL doesn't enable [slow query log](https://dev.mysql.com/doc/refman/en/slow-query-log.html) to record the SQL queries that take a long time to perform. You can modify these settings using the following environment variables:
* `MYSQL_ENABLE_SLOW_QUERY`: Whether to enable slow query logs. Default: `0`
* `MYSQL_LONG_QUERY_TIME`: How much time, in seconds, defines a slow query. Default: `10.0`
Slow queries information is logged to the `<data-dir>/<hostname>-slow.log` file by default, and you can easily check it with the `mysqldumpslow` tool ([link to docs](https://dev.mysql.com/doc/refman/en/mysqldumpslow.html)):
```console
$ docker run -d -e MYSQL_ENABLE_SLOW_QUERY=1 -e ALLOW_EMPTY_PASSWORD=yes --name my-mysql-container bitnami/mysql
# wait a bit for the initialization process...
$ docker exec -it my-mysql-container mysqldumpslow
Reading mysql slow query log from /bitnami/mysql/data/<hostname>-slow.log
Count: 1 Time=0.01s (0s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost
GRANT ALL PRIVILEGES ON *.* TO 'S'@'S' WITH GRANT OPTION
Count: 1 Time=0.01s (0s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost
CREATE USER 'S'@'S'
Count: 1 Time=0.01s (0s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost
DELETE FROM mysql.user WHERE user not in ('S','S')
Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost
flush privileges
(...)
```
### Slow filesystems
In some platforms, the filesystem used for persistence could be slow. That could cause the database to take extra time to be ready. If that's the case, you can configure the `MYSQL_INIT_SLEEP_TIME` environment variable to make the initialization script to wait extra time (in seconds) before proceeding with the configuration operations.