MySQL查询缓存设置 [英] MySql query cache settings

查看:246
本文介绍了MySQL查询缓存设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置MySql的查询缓存?

How can I set the query cache of MySql?

我的"my.ini"文件根本不包含变量mysql_query_typemysql_query_size ...

My "my.ini" file doesn't contain the variable mysql_query_type or mysql_query_size at all...

这些设置如何?

可以从PHP设置它们吗?

Can they be set from PHP?

谢谢

推荐答案

您可以通过更改MySQL配置文件中的query-cache-type值来启用查询缓存.您可能无法从PHP进行更改,但是可以通过向MySQL发送以下查询来清除它:RESET QUERY CACHE.

You may enable query caching by altering the query-cache-type value in your MySQL configuration file. You may not change it from PHP, however you may clear it by sending the following query to MySQL: RESET QUERY CACHE.

这篇关于MySQL查询缓存设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆