「TMV」- 配置 | Configuratin

持久化配置

PERSIST and PERSIST_ONLY

MySQL :: MySQL 8.4 Reference Manual :: 15.7.6.1 SET Syntax for Variable Assignment

persist a global system variable to the mysqld-auto.cnf option file in the data directory

SET PERSIST max_connections = 1000;
SET @@PERSIST.max_connections = 1000;

SET PERSIST_ONLY back_log = 100;
SET @@PERSIST_ONLY.back_log = 100;

PERSIST_ONLY writes the variable setting to mysqld-auto.cnf. However, unlike PERSIST, PERSIST_ONLY does not modify the global variable runtime value.

PERSIST_ONLY suitable for configuring read-only system variables that can be set only at server startup.