How to set the memory limit for MySQL

There is no variables like memory_limit in MySQL my.cnf file – therefore you can’t explicitly set the memory limit for MySQL. You have to configure your my.cnf file based on a combination of variables. These then multiple together to form the MySQL memory limit.

key_buffer_size + (read_buffer_size + sort_buffer_size) * max_connections = K bytes of memory

I hope this help someone.

Leave a Reply