Documentation Home
MySQL 9.1 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.4Mb
PDF (A4) - 40.5Mb
Man Pages (TGZ) - 259.5Kb
Man Pages (Zip) - 366.7Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


29.12.14.2 Performance Schema persisted_variables Table

Thepersisted_variables table provides an SQL interface to themysqld-auto.cnf file that stores persisted global system variable settings, enabling the file contents to be inspected at runtime usingSELECT statements. Variables are persisted usingSET PERSIST orPERSIST_ONLY statements; seeSection 15.7.6.1, “SET Syntax for Variable Assignment”. The table contains a row for each persisted system variable in the file. Variables not persisted do not appear in the table.

TheSENSITIVE_VARIABLES_OBSERVER privilege is required to view the values of sensitive system variables in this table.

For information about persisted system variables, seeSection 7.1.9.3, “Persisted System Variables”.

Suppose thatmysqld-auto.cnf looks like this (slightly reformatted):

{  "Version": 1,  "mysql_server": {    "max_connections": {      "Value": "1000",      "Metadata": {        "Timestamp": 1.519921706e+15,        "User": "root",        "Host": "localhost"      }    },    "autocommit": {      "Value": "ON",      "Metadata": {        "Timestamp": 1.519921707e+15,        "User": "root",        "Host": "localhost"      }    }  }}

Thenpersisted_variables has these contents:

mysql> SELECT * FROM performance_schema.persisted_variables;+-----------------+----------------+| VARIABLE_NAME   | VARIABLE_VALUE |+-----------------+----------------+| autocommit      | ON             || max_connections | 1000           |+-----------------+----------------+

Thepersisted_variables table has these columns:

  • VARIABLE_NAME

    The variable name listed inmysqld-auto.cnf.

  • VARIABLE_VALUE

    The value listed for the variable inmysqld-auto.cnf.

persisted_variables has these indexes:

  • Primary key on (VARIABLE_NAME)

TRUNCATE TABLE is not permitted for thepersisted_variables table.