The difference between startup options and system variables
Startup options are some parameters passed by the user when the program starts;
system variables are variables that affect the running behavior of the server program.
- For startup options, if the startup item name consists of multiple words, it is fine to connect each word with a dash (-) or an underscore (_).
- But for the corresponding system variables, each word must be connected with an underscore (_).
Startup option, system variable underline comparison
1. Add startup options via the command line .
For example, use this command when starting the server program.
mysqld --default-storage-engine-MyISAH --max-connections=10
2. After starting the server program, look at the value of the system variable :
The relationship between them is as follows:
- Most system variables can be passed as startup options.
- Some system variables are automatically generated during program running and cannot be set as startup escape items, such as character_set_client.
- Some startup options are not system variables, such as defaults-file.
——Excerpt from "How MySQL Works"
——Only take notes.