config - lefred/mysqlshell-plugins GitHub Wiki
config
NAME
config - MySQL configuration utility.
DESCRIPTION
A collection of tools to get information on your MySQL Database
Server's configuration variables.
Methods:
getGlobalNonDefault([format][, session])
Prints all global variables being configured or changed.
JS config.getGlobalNonDefault()
+--------------------------------+-------------------------+----------------------------+----------------------------------------------------+-----------+
| Variable Name | Changed by | Time | Value | Source |
+--------------------------------+-------------------------+----------------------------+----------------------------------------------------+-----------+
| binlog_checksum | root@localhost | 2019-06-14 10:14:31.48385 | NONE | PERSISTED |
| binlog_format | root@localhost | 2021-02-10 10:46:47.529909 | ROW | DYNAMIC |
| datadir | NULL | NULL | /var/lib/mysql/ | GLOBAL |
| default_authentication_plugin | NULL | NULL | mysql_native_password | GLOBAL |
| enforce_gtid_consistency | root@localhost | 2019-04-12 12:25:06.919606 | ON | PERSISTED |
| foreign_key_checks | NULL | 2021-02-03 16:56:30.419153 | ON | DYNAMIC |
| ft_boolean_syntax | giuseppe@localhost | 2020-06-12 10:35:49.809926 | + _><()~*:""&| | PERSISTED |
| ft_min_word_len | giuseppe@localhost | 2020-06-12 10:33:59.980709 | 2 | PERSISTED |
| gtid_mode | root@localhost | 2019-04-12 12:25:06.918767 | ON | PERSISTED |
| innodb_flush_log_at_trx_commit | giuseppe@localhost | 2020-05-20 11:00:06.53287 | 1 | PERSISTED |
| innodb_ft_min_token_size | giuseppe@localhost | 2020-06-12 10:36:18.568933 | 2 | PERSISTED |
| log_error | NULL | NULL | /var/log/mysqld.log | GLOBAL |
| pid_file | NULL | NULL | /var/run/mysqld/mysqld.pid | GLOBAL |
| server_id | root@localhost | 2019-04-12 13:58:11.15273 | 3883511195 | PERSISTED |
| socket | NULL | NULL | /var/lib/mysql/mysql.sock | GLOBAL |
| sql_mode | mysql.session@localhost | 2021-02-10 10:59:18.268992 | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_ | DYNAMIC |
| sync_binlog | giuseppe@localhost | 2020-05-20 11:00:13.413141 | 1 | PERSISTED |
+--------------------------------+-------------------------+----------------------------+----------------------------------------------------+-----------+
getPersistedVariables([format][, session])
Prints all variables that have been persisted.
JS config.getPersistedVariables()
+--------------------------------+--------------------+----------------------------+----------------+-----------+
| Variable Name | Changed by | Time | Value | Source |
+--------------------------------+--------------------+----------------------------+----------------+-----------+
| binlog_checksum | root@localhost | 2019-06-14 10:14:31.48385 | NONE | PERSISTED |
| enforce_gtid_consistency | root@localhost | 2019-04-12 12:25:06.919606 | ON | PERSISTED |
| ft_boolean_syntax | giuseppe@localhost | 2020-06-12 10:35:49.809926 | + _><()~*:""&| | PERSISTED |
| ft_min_word_len | giuseppe@localhost | 2020-06-12 10:33:59.980709 | 2 | PERSISTED |
| gtid_mode | root@localhost | 2019-04-12 12:25:06.918767 | ON | PERSISTED |
| innodb_flush_log_at_trx_commit | giuseppe@localhost | 2020-05-20 11:00:06.53287 | 1 | PERSISTED |
| innodb_ft_min_token_size | giuseppe@localhost | 2020-06-12 10:36:18.568933 | 2 | PERSISTED |
| server_id | root@localhost | 2019-04-12 13:58:11.15273 | 3883511195 | PERSISTED |
| sync_binlog | giuseppe@localhost | 2020-05-20 11:00:13.413141 | 1 | PERSISTED |
+--------------------------------+--------------------+----------------------------+----------------+-----------+
getSessionNonDefault([format][, session])
Prints all session variables being changed or configured.
JS config.getSessionNonDefault()
+--------------------+-------------------------+----------------------------+----------------------------------------------------+---------+
| Variable Name | Changed by | Time | Value | Source |
+--------------------+-------------------------+----------------------------+----------------------------------------------------+---------+
| binlog_format | root@localhost | 2021-02-10 10:46:47.529909 | ROW | DYNAMIC |
| foreign_key_checks | NULL | 2021-02-03 16:56:30.419153 | ON | DYNAMIC |
| sql_mode | mysql.session@localhost | 2021-02-10 10:59:18.268992 | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_ | DYNAMIC |
+--------------------+-------------------------+----------------------------+----------------------------------------------------+---------+
JS config.getSessionNonDefault("vertical")
*************************** 1. row ***************************
Variable Name: binlog_format
Changed by: root@localhost
Time: 2021-02-10 10:46:47.529909
Value: ROW
Source: DYNAMIC
*************************** 2. row ***************************
Variable Name: foreign_key_checks
Changed by: NULL
Time: 2021-02-03 16:56:30.419153
Value: ON
Source: DYNAMIC
*************************** 3. row ***************************
Variable Name: sql_mode
Changed by: mysql.session@localhost
Time: 2021-02-10 10:59:18.268992
Value: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
Source: DYNAMIC
getVariableInfo(variable_name[, format][, session])
Prints all variables that have been persisted.
JS config.getVariableInfo('ft_min_word_len', "json")
{
"VARIABLE_NAME": "ft_min_word_len",
"VARIABLE_SOURCE": "PERSISTED",
"VARIABLE_PATH": "/var/lib/mysql/mysqld-auto.cnf",
"MIN_VALUE": "1",
"MAX_VALUE": "84",
"SET_TIME": "2020-06-12 10:33:59.980709",
"SET_USER": "giuseppe",
"SET_HOST": "localhost",
"VARIABLE_VALUE": "2"
}