I've tried to set this by using SET VARIABLE but it said that have_query_cache is read-only
mysql>SHOW VARIABLES LIKE 'have_query_cache';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| have_query_cache | YES |
+------------------+-------+