gpt4 book ai didi

mysql - 无法启用 MySQL 5.6 查询缓存

转载 作者:行者123 更新时间:2023-11-29 04:40:00 25 4
gpt4 key购买 nike

我正在尝试使用 MySQL 5.6.25Ubuntu 15.04 上启用 MySQL 查询缓存

我已将此添加到 /etc/mysql/my.cnf/etc/mysql/conf.d/mysql.cnf 的末尾:

query_cache_type = 1
query_cache_size = 4096M
query_cache_limit = 2M
query_cache_strip_comments =1

整个服务器已经重启不止一次。

user@myhost:/$ mysql
mysql: unknown variable 'query_cache_type=1'

使用 SHOW VARIABLES LIKE '%query_cache%' 确认 query_cache_type = OFF

SET GLOBAL query_cache_type = 1;
/* SQL Error (1651): Query cache is disabled; restart the server with query_cache_type=1 to enable it */

我该如何解决这个问题?

最佳答案

编辑文件/etc/mysql/conf.d/mysql.cnf

添加

[mysqld]
query_cache_size = 268435456
query_cache_type=1
query_cache_limit=1048576

关于mysql - 无法启用 MySQL 5.6 查询缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31689132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com