Can';t启用MySQL 5.6查询缓存

Can';t启用MySQL 5.6查询缓存,mysql,caching,Mysql,Caching,我正在尝试使用MySQL 5.6.25在Ubuntu 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

我正在尝试使用MySQL 5.6.25在Ubuntu 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变量,如“%query\u cache%”
确认
query\u cache\u 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


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


你能做一个
查找-name“my.cnf”
看看你的服务器上还有没有其他的my.cnf吗?有:
/etc/mysql/my.cnf./etc/alternations/my.cnf./var/lib/dpkg/alternations/my.cnf./usr/my.cnf
usr/my.cnf
中有什么?你把参数放在
my.cnf
的什么地方?在[mysqld]下?我建议在这里发布你能做一个
find-name“my.cnf”吗
看看您的服务器上是否还有其他my.cnf?有:
/etc/mysql/my.cnf./etc/alternations/my.cnf./var/lib/dpkg/alternations/my.cnf./usr/my.cnf
usr/my.cnf中有什么?您在
my.cnf
中的参数放在哪里?在[mysqld]下?我建议在这里发布
mysql:[ERROR]未知变量'query\u cache\u type=1'
我在重新启动mysqld时出错
mysql:[ERROR]未知变量'query\u cache\u type=1'
我在重新启动mysqld时出错
[mysqld]
query_cache_size = 268435456
query_cache_type=1
query_cache_limit=1048576