Answer the question
In order to leave comments, you need to log in
How to fix problem with World-writable config file '/etc/mysql/my.cnf' is ignored?
Hello! There is a docker compose and there is a database section, it looks like this:
db:
platform: linux/x86_64
image: mysql:latest
ports:
- '${DB_PORT}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
MYSQL_DATABASE: '${MYSQL_DATABASE}'
MYSQL_USER: '${MYSQL_USER}'
MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
volumes:
- './docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d'
- './docker/mysql/db_data:/var/lib/mysql'
- './docker/mysql/my.cnf:/etc/mysql/my.cnf'
- './docker/logs/mysql:/var/log/mysql'
Answer the question
In order to leave comments, you need to log in
Write permissions allow everyone to change the config.
And you need to give such rights so that only root can make changes to the config
You can try like this
- './docker/mysql/my.cnf:/etc/mysql/my.cnf:ro'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question