

# 重置数据库集群参数组中的参数
<a name="USER_WorkingWithParamGroups.ResettingCluster"></a>

您可以在客户创建的数据库集群参数组中将参数重置为其默认值。对客户创建的数据库集群参数组中的参数所做的更改将应用于与此数据库集群参数组关联的所有数据库集群。

**注意**  
在默认数据库集群参数组中，参数始终设置为默认值。

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

**将数据库集群参数组中的参数重置为其默认值**

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

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

1. 在列表中，选择参数组。

1. 对于 **Parameter group actions (参数组操作)**，选择 **Edit (编辑)**。

1. 选择要重置为默认值的参数。您可使用对话框右上方的箭头键滚动参数。

   您无法重置默认参数组中的值。

1. 选择**重置**，然后通过选择**重置参数**进行确认。

1. 重启。

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

要将数据库集群参数组中的参数重置为其默认值，请使用带以下必要选项的 AWS CLI [https://docs.aws.amazon.com/cli/latest/reference/rds/reset-db-cluster-parameter-group.html](https://docs.aws.amazon.com/cli/latest/reference/rds/reset-db-cluster-parameter-group.html) 命令：`--db-cluster-parameter-group-name`。

要重置数据库集群参数组中的所有参数，请指定 `--reset-all-parameters` 选项。要重置特定参数，请指定 `--parameters` 选项。

以下示例将名为 *mydbparametergroup* 的数据库参数组中的所有参数重置为其默认值。

**Example**  
对于 Linux、macOS 或 Unix：  

```
aws rds reset-db-cluster-parameter-group \
    --db-cluster-parameter-group-name mydbparametergroup \
    --reset-all-parameters
```
对于：Windows  

```
aws rds reset-db-cluster-parameter-group ^
    --db-cluster-parameter-group-name mydbparametergroup ^
    --reset-all-parameters
```

以下示例展示了在名为 *mydbclusterparametergroup* 的数据库集群参数组中将 `server_audit_logging` 和 `server_audit_logs_upload` 重置为其默认值。

**Example**  
对于 Linux、macOS 或 Unix：  

```
aws rds reset-db-cluster-parameter-group \
    --db-cluster-parameter-group-name mydbclusterparametergroup \
    --parameters "ParameterName=server_audit_logging,ApplyMethod=immediate" \
                 "ParameterName=server_audit_logs_upload,ApplyMethod=immediate"
```
对于：Windows  

```
aws rds reset-db-cluster-parameter-group ^
    --db-cluster-parameter-group-name mydbclusterparametergroup ^
    --parameters "ParameterName=server_audit_logging,ParameterValue=1,ApplyMethod=immediate" ^
                 "ParameterName=server_audit_logs_upload,ParameterValue=1,ApplyMethod=immediate"
```
该命令产生类似下面的输出：  

```
DBClusterParameterGroupName  mydbclusterparametergroup
```

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

要将数据库集群参数组中的参数重置为其默认值，请使用带以下必需参数的 RDS API [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ResetDBClusterParameterGroup.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ResetDBClusterParameterGroup.html) 命令：`DBClusterParameterGroupName`。

要重置数据库集群参数组中的所有参数，请将 `ResetAllParameters` 参数设置为 `true`。要重置特定参数，请指定 `Parameters` 参数。