How to check MySQL query caching status on your CentOS Linux server?

How to check MySQL query caching status on your CentOS Linux server?

1. First of all, you have to log in as root using SSH on the server.

2. Now, open MySQL prompt and run this command:
mysql> SHOW VARIABLES LIKE '%query_cache%';
This will give a tabular result like:

+------------------------------+-----------+
| Variable_name | Value |
+------------------------------+-----------+
| have_query_cache | YES |
| query_cache_limit | 2097152 |
| query_cache_min_res_unit | 8192 |
| query_cache_size | 268435456 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
+------------------------------+-----------+
6 rows in set (0.01 sec)


query_cache_type will be set to ON or OFF as required.
Author
bhawanisingh
Views
2,778
First release
Last update
Rating
0.00 star(s) 0 ratings
Top