簡體   English   中英

無法啟用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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM