Troubleshooting·MySQL
MySQL Persisted Configuration
SET PERSIST writes to a JSON file the server owns, and that value outranks your config file. This is why a setting can refuse to change no matter what you edit - and variables_info is the command that ends the argument.
Configuration Guide 13 of 45 Intermediate
- OSUbuntu 26.04 LTS
- MySQL8.4.10-0ubuntu0.26.04.1
- EngineInnoDB (default)
- TimeAbout 16 min
SET PERSIST and mysqld-auto.cnf are 8.0+. On 5.7 the config file is the only durable mechanism, and this class of confusion does not exist.
| 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 a change has to survive a restart and outrank a configuration file. This matters because SET PERSIST writes to a JSON file the server owns - and that value beats the drop-in file you carefully edited.
- persisting a value, and finding where it was actually written
- confirming it survives the same restart that discarded
SET GLOBAL - asking the server where each value came from
- watching a configuration file lose to a persisted value
- removing the persisted entry, and letting the file take over again
Before you start
- MySQL 8 on db-a01, and the drop-in file from guide 11.
-
Persist a value, and look at where it went
-
Confirm it survives a restart
-
Ask the server where each value came from
-
Watch a config file lose
-
Remove the persisted value and let the file take over