MariaDB is normally configured by editing the my.cnf file. Logout of mysql. Use this form when tuning your MySQL database server to calculate the maximum MySQL memory usage based on configuration settings used in your my.cnf file. my.cnf Files. to 8M) but don't overdo it. MySQL Query Cache Speedup Example. If present, you can examine them to see more complete examples of some of the many ways to configure MariaDB … ; Add the following settings to the my.cnf file in the text editor. Suggestions for your my.cnf-ini [mysqld] section query_cache_type=0 # for OFF query_cache_size=0 # to ensure QC is NOT USED Not using QC reduces some amount of CPU utilization. To enable the query cache with a 50MB query cache in MySQL, you would add the following line to the my.cnf file, under the [mysqld] section: query-cache-size = 50M. Login to mysql, and run the following: mysql> SET GLOBAL event_scheduler=1; mysql> SET GLOBAL query_cache_size=16777216; STEP 03 : Logout and Login and Check. Please note that query_cache_strip_comments variable is available on Percona & MariaDB mysql variants as of now. With a query_cache_size of 128M the cache can hold up to 32 query/result-sets and most likely a lot more because not all query/result-sets require 4M. The next time MySQL is restarted it will have the query cache enabled with the size specified. to 6M) & sort_buffer_size (e.g. Setting the MYSQL query cache size in my.cnf. STEP 01 : Edit my.cnf. To create and configure the my.cnf file for Windows machines, complete the following tasks:. You can tune the query_cache_limit a little higher if you have a lot of larger query/result-sets, but not too high since the query_cache_size is advised to have a maximum of 128M. In order to make the query_cache_size setting permanent, the MySQL server configuration file must be modified. These settings are stored in a file called my.cnf which is typically stored on a Linux system at /etc/my.cnf or sometimes at /etc/mysql/my.cnf. 96M (but don't go above 128M), measure your connections (lots of folks do the mistake of using crazy numbers there and they don't realize each connection is multiplied by all the buffer & cache values), adapt your read_rnd_buffer_size (e.g. The following my.cnf example files were included with MariaDB until MariaDB 10.3.0. Create the my.cnf file in a text editor, and save it to the following location: D:\Spend\mysql-5.5.15-winx64. Please edit these lines in my.cnf [mysql] event_scheduler=ON STEP 02 : Enabled it manually. I would also recommend fine tuning your query_cache_size to a higher value, e.g.

Meaning of variables query_cache_type. Add something like below following to your /etc/my/my.cnf. query_cache_type = 1 query_cache_size = 256M query_cache_limit = 2M query_cache_strip_comments =1. Just turn it ON. MySQL Memory Calculator.