如何设置have_query_cache = YES?

问题描述

我试图使用SET VARIABLE进行设置,但是它说have_query_cache是​​只读的

mysql>SHOW VARIABLES LIKE 'have_query_cache';
+------------------+-------+
|    Variable_name | Value |
+------------------+-------+
| have_query_cache |   YES |
+------------------+-------+

解决方法

对于受支持的MySQL版本(小于8.0左右),请enable the query cache in the server configuration使用例如变量query_cache_sizequery_cache_type

have_query_cache变量仅通知您当前是否启用了缓存。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...