How To Check if MySQL Query Caching is Turned On

by Pete Freitag

Need to know if the query cache is turned on in MySQL? Simply run the following SQL statement:

SHOW VARIABLES LIKE 'query_cache_type';

If the query cache is turned on it should look something like this:

mysql> SHOW VARIABLES LIKE 'query_cache_type';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| query_cache_type | ON    |
+------------------+-------+

More info on: query caching in MySQL.