將資料庫叢集參數群組與 Amazon Aurora 中的資料庫叢集建立關聯 - Amazon Aurora

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

將資料庫叢集參數群組與 Amazon Aurora 中的資料庫叢集建立關聯

您可以使用自訂設定,建立自己的資料庫叢集參數群組。您可以使用 AWS 管理主控台、AWS CLI 或 RDS API,將資料庫叢集參數群組與資料庫叢集建立關聯。您可以在建立或修改資料庫叢集時執行此動作。

如需建立資料庫叢集參數群組的詳細資訊,請參閱在 Amazon Aurora 中建立資料庫叢集參數群組。如需建立資料庫叢集的詳細資訊,請參閱建立 Amazon Aurora 資料庫叢集。如需修改資料庫叢集的詳細資訊,請參閱修改 Amazon Aurora 資料庫叢集

注意

對於 Aurora PostgreSQL 15.2、14.7、13.10、12.14 和所有的第 11 版,當您變更與資料庫叢集相關聯的資料庫叢集參數群組後,請將每個複本執行個體重新開機,以套用變更。

若要判斷資料庫叢集的主要資料庫執行個體是否必須重新啟動才能套用變更,請執行下列 AWS CLI 命令:

aws rds describe-db-clusters --db-cluster-identifier db_cluster_identifier

檢查輸出中主要資料庫執行個體的 DBClusterParameterGroupStatus 值。如果值為 pending-reboot,則重新啟動資料庫叢集的主要資料庫執行個體。

將資料庫叢集參數群組與資料庫叢集建立關聯
  1. 登入 AWS 管理主控台,開啟位於 https://console.aws.amazon.com/rds/ 的 Amazon RDS 主控台。

  2. 在導覽窗格中選擇 Databases (資料庫),然後選取您要修改的資料庫叢集。

  3. 選擇 Modify (修改)Modify DB cluster (修改資料庫叢集) 頁面隨即出現。

  4. 變更 DB cluster parameter group (資料庫叢集參數群組) 設定。

  5. 選擇 Continue (繼續),並檢查修改的摘要。

    無論 Scheduling of modifications (修改排程) 設定為何,都會立即套用變更。

  6. 在確認頁面上,檢閱您的變更。如果都正確,請選擇 Modify cluster (修改叢集) 以儲存您的變更。

    或者,選擇 Back (上一步) 以編輯變更,或是選擇 Cancel (取消) 以取消變更。

若要將資料庫叢集參數群組與資料庫叢集建立關聯,請使用 AWS CLI modify-db-cluster 命令搭配下列選項:

  • --db-cluster-name

  • --db-cluster-parameter-group-name

下面的範例將 mydbclpg 資料庫參數群組與 mydbcluster 資料庫叢集建立關聯。

範例

對於 Linux、macOS 或 Unix:

aws rds modify-db-cluster \ --db-cluster-identifier mydbcluster \ --db-cluster-parameter-group-name mydbclpg

在 Windows 中:

aws rds modify-db-cluster ^ --db-cluster-identifier mydbcluster ^ --db-cluster-parameter-group-name mydbclpg

若要將資料庫叢集參數群組與資料庫叢集建立關聯,請使用 RDS API ModifyDBCluster 操作搭配下列參數:

  • DBClusterIdentifier

  • DBClusterParameterGroupName