Save 15% on Instant Deploy Bare-Metal Servers in 26 Global Markets with Coupon Code: EdgeSave

How to check MySQL query caching status on your linux server?

Login to your server as root.

 

On mysql prompt fire the following command:

 

mysql> SHOW VARIABLES LIKE ‘%query_cache%’;

 

This will result the table as follows :

+——————————+———–+
| Variable_name | Value |
+——————————+———–+
| have_query_cache | YES |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 134217728 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
+——————————+———–+
6 rows in set (0.00 sec)

 

query_cache_type will be set to ON or OFF as required.

Share on Twitter
Share on Facebook