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
- OSUbuntu 26.04 LTS
- MySQL8.4.10-0ubuntu0.26.04.1
- EngineInnoDB (default)
- TimeAbout 14 min
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.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| db-a01 | 192.168.0.81 | Ubuntu 26.04 LTS | Primary / Source / Replica Set Member 1 | 2 Core | 4 GB | 50 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.
- reading the two numbers that matter most
- setting them in a drop-in file, the right home for a deliberate change
- validating before restarting, always
- confirming what the server actually came up with, in bytes
Before you start
- MySQL on db-a01, and the drop-in file mechanism from guide 11.
-
Read the two numbers that matter most
-
Set them in a file, so they outlive everything
-
Validate before restarting, always
-
Confirm what the server came up with