This topic describes how to view AnalyticDB for MySQL configuration items using the SHOW ADB_CONFIG command.
Prerequisites
The kernel version of the cluster must be 3.1.6.0 or later.
To view and update the minor version of an AnalyticDB for MySQL cluster, log on to the AnalyticDB for MySQL console and go to the Configuration Information section of the Cluster Information page.
Syntax
SHOW ADB_CONFIG KEY=[resource_group_name.]config_name;To query a configuration item for a specific resource group, enclose resource_group_name.config_name in single quotation marks ('). Otherwise, the system cannot recognize the name of the configuration item.
Parameters
resource_group_name: Optional. The name of the resource group. Specify this parameter to query the configuration items for a specific resource group. If you omit this parameter, the values of global configuration items are returned.config_name: The name of the configuration item. For more information, see Config and Hint configuration parameters.
Return value
Returns the value of the corresponding configuration item.
If the configuration item is manually configured, the configured value is returned.
If the configuration item is not manually configured, the default value is returned.
If you have manually configured global configuration parameters but not resource group-level ones, the specified values of global configuration parameters take effect. When you execute the SHOW ADB_CONFIG statement to query resource group-level configuration parameters, their default values are returned. Given that the values that take effect and the return values of the SHOW ADB_CONFIG statement are inconsistent, you must query both the resource group-level configuration parameters and global configuration parameters.
Examples
Query the query timeout for the current cluster.
SHOW ADB_CONFIG KEY=query_timeout;The following result is returned:
+---------------+---------+ | key | value | +---------------+---------+ | QUERY_TIMEOUT | 1800000 | +---------------+---------+ 1 row in set (0.06 sec)Query the query timeout for the user_default resource group.
SHOW ADB_CONFIG KEY='user_default.query_timeout';The following result is returned:
+----------------------------+---------+ | key | value | +----------------------------+---------+ | USER_DEFAULT.QUERY_TIMEOUT | 1800000 | +----------------------------+---------+ 1 row in set (0.06 sec)