Configuration·MySQL
MySQL Configuration Files and Load Order
MySQL reads several files in a fixed order and the last one wins. The server will tell you which files it looks at - which is more reliable than any list in documentation, because it reflects how this binary was built.
Configuration Guide 11 of 45 Intermediate
- OSUbuntu 26.04 LTS (resolute)
- MySQL8.4.10-0ubuntu0.26.04.1
- EngineInnoDB (default)
- TimeAbout 13 min
- Reviewed27 August 2026
Written against the versions above. Debian and Ubuntu split the configuration into `/etc/mysql/` with drop-in directories. RPM builds keep a single `/etc/my.cnf`. The load-order mechanism is identical.
| 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 |
Before you start
- MySQL running on db-a01.
-
Ask the binary which files it reads
-
Look at what is really there
-
Add a drop-in file and check it before restarting
-
Restart, and read what actually took effect