

# 查看数据库集群参数组的参数值
<a name="USER_WorkingWithParamGroups.ViewingCluster"></a>

您可获得数据库集群参数组内所有参数的列表及它们的值。

## 控制台
<a name="USER_WorkingWithParamGroups.ViewingCluster.CON"></a>

**查看数据库集群参数组的参数值**

1. 登录 AWS 管理控制台 并通过以下网址打开 Amazon RDS 控制台：[https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/)。

1. 在导航窗格中，选择**参数组**。

   数据库集群参数组出现在**数据库集群参数组**的**类型**列表中。

1. 选择数据库集群参数组的名称以查看其参数列表。

## AWS CLI
<a name="USER_WorkingWithParamGroups.ViewingCluster.CLI"></a>

要查看数据库集群参数组的参数值，请使用 AWS CLI [https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-cluster-parameters.html](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-cluster-parameters.html) 命令及以下必要参数。
+ `--db-cluster-parameter-group-name`

**Example**  
以下示例以 JSON 格式列出名为 *mydbclusterparametergroup* 的数据库集群参数组的参数和参数值。  
此命令会返回类似以下内容的响应：  

```
aws rds describe-db-cluster-parameters --db-cluster-parameter-group-name mydbclusterparametergroup
```

```
{
    "Parameters": [
        {
            "ParameterName": "activate_all_roles_on_login",
            "ParameterValue": "0",
            "Description": "Automatically set all granted roles as active after the user has authenticated successfully.",
            "Source": "engine-default",
            "ApplyType": "dynamic",
            "DataType": "boolean",
            "AllowedValues": "0,1",
            "IsModifiable": true,
            "ApplyMethod": "pending-reboot",
            "SupportedEngineModes": [
                "provisioned"
            ]
        },
        {
            "ParameterName": "allow-suspicious-udfs",
            "Description": "Controls whether user-defined functions that have only an xxx symbol for the main function can be loaded",
            "Source": "engine-default",
            "ApplyType": "static",
            "DataType": "boolean",
            "AllowedValues": "0,1",
            "IsModifiable": false,
            "ApplyMethod": "pending-reboot",
            "SupportedEngineModes": [
                "provisioned"
            ]
        },
...
```

## RDS API
<a name="USER_WorkingWithParamGroups.ViewingCluster.API"></a>

要查看数据库集群参数组的参数值，请使用带下列所需参数的 RDS API [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBParameters.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBParameters.html) 命令。
+ `DBClusterParameterGroupName`

在某些情况下，不显示参数的允许值。这些始终是源为数据库引擎原定设置值的参数。

要查看这些参数的值，可以运行以下 SQL 语句：
+ MySQL：

  ```
  -- Show the value of a particular parameter
  mysql$ SHOW VARIABLES LIKE '%parameter_name%';
  
  -- Show the values of all parameters
  mysql$ SHOW VARIABLES;
  ```
+ PostgreSQL：

  ```
  -- Show the value of a particular parameter
  postgresql=> SHOW parameter_name;
  
  -- Show the values of all parameters
  postgresql=> SHOW ALL;
  ```