I read Syntax for Persisting System Variables in MySQL documentation about PERSIST and PERSIST_ONLY as shown below:
- To persist a global system variable to the
mysqld-auto.cnfoption file in the data directory, precede the variable name by thePERSISTkeyword or the@@PERSIST.qualifier:
SET PERSIST max_connections = 1000;
SET @@PERSIST.max_connections = 1000;
- To persist a global system variable to the
mysqld-auto.cnffile without setting the global variable runtime value, precede the variable name by thePERSIST_ONLYkeyword or the@@PERSIST_ONLY.qualifier:
SET PERSIST_ONLY back_log = 100;
SET @@PERSIST_ONLY.back_log = 100;
It seems like PERSIST sets a global variable runtime value but PERSIST_ONLY doesn't set a global variable runtime value but I don't understand what a global variable runtime value is, so I don't really understand the difference between PERSIST and PERSIST_ONLY.
My questions:
- What is the global variable runtime value?
- What is the difference between PERSIST and PERSIST_ONLY?