I am trying to disable the query_cache_type in my mariadb pod in docker due to known performance issues with that and InnoDB. I have some current settings in a production server running on an rpm that have the following settings:
query_cache_limit=1048576
query_cache_size=1048576
query_cache_type=OFF
Yet when I try to mimic these settings on my new server, it defaults to having query_cache_type set to ON when I look at "show GLOBAL VARIABLES"
| query_cache_type | ON
I have tried to look in the error logs and see now mention of the term query_cache_type. I also restarted the docker mariadb instance to refresh the database configs and it did not update. Is there anything I should check? Could it possibly be that I need to completely remove the database to have it start with the new configs? I would rather not manually change it as it should be grabbing the right configs from my.cnf.
Starting from MariaDB 10.1.7, query_cache_type is automatically set to ON if the server is started with the query_cache_size set to a non-zero (and non-default) value.
-- https://mariadb.com/kb/en/query-cache/
So, add (or change) this to the [mysqld]
section of my.cnf
:
query_cache_size=0