PDF (A4) - 40.9Mb
Man Pages (TGZ) - 261.1Kb
Man Pages (Zip) - 368.3Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb
Thevariables_info table shows, for each system variable, the source from which it was most recently set, and its range of values.
Thevariables_info table has these columns:
VARIABLE_NAMEThe variable name.
VARIABLE_SOURCEThe source from which the variable was most recently set:
COMMAND_LINEThe variable was set on the command line.
COMPILEDThe variable has its compiled-in default value.
COMPILEDis the value used for variables not set any other way.DYNAMICThe variable was set at runtime. This includes variables set within files specified using the
init_filesystem variable.EXPLICITThe variable was set from an option file named with the
--defaults-fileoption.EXTRAThe variable was set from an option file named with the
--defaults-extra-fileoption.GLOBALThe variable was set from a global option file. This includes option files not covered by
EXPLICIT,EXTRA,LOGIN,PERSISTED,SERVER, orUSER.LOGINThe variable was set from a user-specific login path file (
~/.mylogin.cnf).PERSISTEDThe variable was set from a server-specific
mysqld-auto.cnfoption file. No row has this value if the server was started withpersisted_globals_loaddisabled.SERVERThe variable was set from a server-specific
option file. For details about how$MYSQL_HOME/my.cnfMYSQL_HOMEis set, seeSection 6.2.2.2, “Using Option Files”.USERThe variable was set from a user-specific
~/.my.cnfoption file.
VARIABLE_PATHIf the variable was set from an option file,
VARIABLE_PATHis the path name of that file. Otherwise, the value is the empty string.MIN_VALUEThe minimum permitted value for the variable. For a variable whose type is not numeric, this is always 0.
This column is deprecated, and subject to removal in a future release; instead, use the
MIN_VALUEcolumn of thevariables_metadatatable to obtain this information.MAX_VALUEThe maximum permitted value for the variable. For a variable whose type is not numeric, this is always 0.
This column is deprecated, and subject to removal in a future release; instead, use the
MAX_VALUEcolumn of thevariables_metadatatable to obtain this information.SET_TIMEThe time at which the variable was most recently set. The default is the time at which the server initialized global system variables during startup.
SET_USER,SET_HOSTThe user name and host name of the client user that most recently set the variable. If a client connects as
user17from hosthost34.example.comusing the account'user17'@'%.example.com,SET_USERandSET_HOSTareuser17andhost34.example.com, respectively. For proxy user connections, these values correspond to the external (proxy) user, not the proxied user against which privilege checking is performed. The default for each column is the empty string, indicating that the variable has not been set since server startup.
Thevariables_info table has no indexes.
TRUNCATE TABLE is not permitted for thevariables_info table.
If a variable with aVARIABLE_SOURCE value other thanDYNAMIC is set at runtime,VARIABLE_SOURCE becomesDYNAMIC andVARIABLE_PATH becomes the empty string.
A system variable that has only a session value (such asdebug_sync) cannot be set at startup or persisted. For session-only system variables,VARIABLE_SOURCE can be onlyCOMPILED orDYNAMIC.
If a system variable has an unexpectedVARIABLE_SOURCE value, consider your server startup method. For example,mysqld_safe reads option files and passes certain options it finds there as part of the command line that it uses to startmysqld. Consequently, some system variables that you set in option files might display invariables_info asCOMMAND_LINE, rather than asGLOBAL orSERVER as you might otherwise expect.
Some sample queries that use thevariables_info table, with representative output:
Display variables set on the command line:
mysql> SELECT VARIABLE_NAME FROM performance_schema.variables_info WHERE VARIABLE_SOURCE = 'COMMAND_LINE' ORDER BY VARIABLE_NAME;+---------------+| VARIABLE_NAME |+---------------+| basedir || datadir || log_error || pid_file || plugin_dir || port |+---------------+Display variables set from persistent storage:
mysql> SELECT VARIABLE_NAME FROM performance_schema.variables_info WHERE VARIABLE_SOURCE = 'PERSISTED' ORDER BY VARIABLE_NAME;+--------------------------+| VARIABLE_NAME |+--------------------------+| event_scheduler || max_connections || validate_password.policy |+--------------------------+Join
variables_infowith theglobal_variablestable to display the current values of persisted variables, together with their range of values:mysql> SELECT VI.VARIABLE_NAME, GV.VARIABLE_VALUE, VI.MIN_VALUE,VI.MAX_VALUE FROM performance_schema.variables_info AS VI INNER JOIN performance_schema.global_variables AS GV USING(VARIABLE_NAME) WHERE VI.VARIABLE_SOURCE = 'PERSISTED' ORDER BY VARIABLE_NAME;+--------------------------+----------------+-----------+-----------+| VARIABLE_NAME | VARIABLE_VALUE | MIN_VALUE | MAX_VALUE |+--------------------------+----------------+-----------+-----------+| event_scheduler | ON | 0 | 0 || max_connections | 200 | 1 | 100000 || validate_password.policy | STRONG | 0 | 0 |+--------------------------+----------------+-----------+-----------+
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 261.1Kb
Man Pages (Zip) - 368.3Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb