[SQL] The difference and relationship between startup options and system variables - MySQL

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 :

insert image description here

The relationship between them is as follows:

  1. Most system variables can be passed as startup options.
  2. Some system variables are automatically generated during program running and cannot be set as startup escape items, such as character_set_client.
  3. Some startup options are not system variables, such as defaults-file.

——Excerpt from "How MySQL Works"
——Only take notes.

おすすめ

転載: blog.csdn.net/xiaoyue_/article/details/129945540