[英]can't enable MySql general query log file on wamp running mysql 5.6
[英]Can't enable MySQL 5.6 Query Cache
我正在尝试在具有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 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.