| Bug #87943 | non default bin-log location in mysql enterprise docker image is not considered | ||
|---|---|---|---|
| Submitted: | 2 Oct 2017 14:06 | Modified: | 3 Oct 2017 10:11 |
| Reporter: | Oli Sennhauser | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Package Repos | Severity: | S2 (Serious) |
| Version: | 5.7.19 | OS: | Any (docker image) |
| Assigned to: | Lars Tangvald | CPU Architecture: | Any |
| Tags: | docker, Enterprise, log-bin | ||
[2 Oct 2017 14:07]
Oli Sennhauser
Our workaround does not yet consider when a non binary log server was changed to a binary log server... So the patch must be somewhere else in the skript. e.g at the end...
[3 Oct 2017 10:11]
Lars Tangvald
This is a general issue for any setting that determines where on disk the server writes certain files (e.g. log-error, secure-file-priv, etc.). Currently only the datadir setting is handled, but we should try to find a general way to deal with all of them (preferably not by adding the suggested snippet for every single option).

Description: When an binary log location outside of datadir is choosen the entrypoint.sh script does not consider it and the server will not start with messages like directory does not exist or permission denied. How to repeat: start docker container with log_bin=/var/log/mysql/binlog Suggested fix: this should be considered. Our current strategy is to alter the current enterprise-server docker image as follows: sed -i '51i if [ "${MYSQL_BINLOG_DIR}" != "" ] ; then' entrypoint.sh sed -i '52i mkdir -p "${MYSQL_BINLOG_DIR}"' entrypoint.sh sed -i '53i chown -R mysql: "${MYSQL_BINLOG_DIR}"' entrypoint.sh sed -i '54i fi' entrypoint.sh