![](/img/trans.png)
[英]How to configure MySQL instance with multiline command flag in docker-compose.yml
[英]How configure Mysql 5.7 in docker compose?
我在 docker-compose.yml 中有這個
mysql:
image: mysql:5.7
restart: always
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf.d:/etc/mysql/conf.d
environment:
MYSQL_ROOT_PASSWORD: pass
logging:
driver: "json-file"
options:
max-size: 10m
max-file: "3"
labels: mysql
env: ubuntu
networks:
- backend
和
# cat ./mysql/conf.d/my-custom.conf
[mysqld]
query_cache_size=1048573
query_cache_type=ON
query_cache_limit=256K
但無論如何 mysql 有 query_cache_type=OFF:(
我該如何解決這個問題? 謝謝!
解決。 我希望這對某人有用
mysql:
image: mysql:5.7
command: --query_cache_type=1 --query_cache_limit=10485760 --query_cache_size=1048576000
restart: always
volumes:
- ./mysql/data:/var/lib/mysql
...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.