【发布时间】:2021-11-20 20:33:21
【问题描述】:
我在 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 5.x 目前是一个旧数据库。我强烈建议使用 MySQL 8.x 或 MariaDB 10.5 启动一个新应用程序。当然,除非有令人信服的理由使用这种旧版本的数据库。
-
我有一个遗留项目,现在我需要对它进行 dokerize...
标签: mysql docker-compose