CertGrid CertGrid
Configuration·MySQL

MySQL Buffer Pool and Connection Limits

The two settings worth touching before any others, what they cost, and how to set them so they survive - on a 4 GB host where getting the buffer pool wrong takes the machine down rather than making it slow.

Configuration Guide 14 of 45 Intermediate

Sizing advice here is for a small shared host. The general rule - the buffer pool is the single biggest memory consumer and should be the number you choose deliberately - holds at any size.

Every command on this page ran on db-a01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB

This guide includes

Use this when tuning MySQL for the first time. This matters because two settings are worth touching before any others - and both belong in a file, so they outlive the session and the restart.

Before you start

  1. Read the two numbers that matter most

  2. Set them in a file, so they outlive everything

  3. Validate before restarting, always

  4. Confirm what the server came up with

Official sources