WL#711: Variable handling: Realoading the options and permanent options
There are two more features in variables handling which are requested by users: 1) reload my.cnf without restarting server. This is not the same as setting variables online as it allows you to make sure variables will be loaded this way then you restart the server, ie you have not done any errors in my.cnf. Doing the above is quite hard as we can't use much of the current option handling code for this. (I belive its better to NOT implement this at all than having to recode all option handling) ------------ The following is NOT to be implemented as having this feature is likely to cause more problems than it solves. (For example, which option to use when there is conflicting options from my.cnf files): 2) storing variable settings in permanent memory (as we now do with replication settings) having server started with global options it was running is very convinent as it removes the need to specify options in two places. ------------- Actually there is possible way to implement it without any conflicts. 1) add option --load-variables=XXX to MySQL to force loading variables on startup from named section. It overrides values from My.cnf and is similar to havving init file with SET VARIABLE command. 2) add command SAVE VARIABLES
possibly with variables list; This would allow to save current variables. and LOAD VARIABLES of course Section name can be ommited to use default section. Several sections concept gives nice benefit - you can quickly switch profiles in MySQL server. For example try new settings with possibility to quickly roll back to safe one. Variables can be stored in one of the tables in mysql database for easy access. Of course this would not allow to tune not runtime tunable options such as port or data directory but this is not what you usually need and might be not even what you would like to be tuned remotely.
Copyright (c) 2000, 2021, Oracle Corporation and/or its affiliates. All rights reserved.