MySQL 8.0 新增performance_schema.variables_info 表查询参数来源、修改时间、修改用户。

MySQL 8.0 新增performance_schema.variables_info 表查询参数来源、修改时间、修改用户。

mysql> select  * from performance_schema.variables_info where variable_name = 'max_connections'\G
*************************** 1. row ***************************
  VARIABLE_NAME: max_connections
VARIABLE_SOURCE: EXPLICIT
  VARIABLE_PATH: /etc/my.cnf
      MIN_VALUE: 1
      MAX_VALUE: 100000
       SET_TIME: NULL
       SET_USER: NULL
       SET_HOST: NULL
1 row in set (0.02 sec)

 

VARIABLE_SOURCE 代表参数来源,有如下的值:
COMMAND_LINE
The variable was set on the command line. 
命令行。

COMPILED
The variable has its compiled-in default value. COMPILED is the value used for variables not set any other way.
编译的默认值。

DYNAMIC
The variable was set at runtime. This includes variables set within files specified using the init_file system variable.
在线动态修改。

EXPLICIT
The variable was set from an option file named with the --defaults-file option.
来自--defaults-file的配置。

EXTRA
The variable was set from an option file named with the --defaults-extra-file option.
来自 --defaults-extra-file的配置。

GLOBAL
The variable was set from a global option file. This includes option files not covered by EXPLICIT, EXTRA, LOGIN, PERSISTED, SERVER, or USER.
全局配置文件,如/etc/my.cnf、/etc/mysql/my.cnf等。

LOGIN
The variable was set from a user-specific login path file (~/.mylogin.cnf).
来自 ~/.mylogin.cnf的配置

PERSISTED
The variable was set from a server-specific mysqld-auto.cnf option file. No row has this value if the server was started with persisted_globals_load disabled.
来自持久化配置文件 mysqld-auto.cnf。

SERVER
The variable was set from a server-specific $MYSQL_HOME/my.cnf option file. For details about how MYSQL_HOME is set, see Section 4.2.2.2, “Using Option Files”.
来自$MYSQL_HOME/my.cnf的配置。

USER
The variable was set from a user-specific ~/.my.cnf option file.
来自~/.my.cnf的配置。

 

posted @ 2023-05-15 22:26  屠魔的少年  阅读(7)  评论(0)    收藏  举报