All Products
Search
Document Center

PolarDB:Use parameter templates

Last Updated:Mar 28, 2026

Parameter templates let you define a set of parameter values once and apply them to multiple PolarDB clusters. Instead of configuring each cluster individually, manage parameters from a single location and push changes across clusters in one step.

Prerequisites

Before you begin, ensure that you have:

Create a parameter template

  1. Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.

  2. On the Custom Parameter Templates tab, click Create Parameter Template. Configure the following parameters, then click OK.

    ParameterDescription
    Template nameA name for the template. The name must consist of letters, digits, and underscores (_), start with a letter, contain no Chinese characters, and be 8–64 characters in length.
    Database engineThe database engine. Valid values: MySQL.
    Database versionThe MySQL version. Valid values: 8.0, 5.7, 5.6.
    DescriptionAn optional description for the template. Accepts any language. 0–200 characters.
    Add configurationClick Add Parameter to add a parameter row. Select a Parameter Name and set a Current Value based on the Description and Valid Value columns. The table also shows whether a restart is required and the default value. To add more parameters, click Add Parameter again. To remove a parameter, click Delete on the right.
    ImportClick Import Parameter to bulk-add parameters in key=value format, one parameter per line. Example: wait_timeout=60 thread_stack=262144

Apply a parameter template

You can apply a template from either the Parameter Templates page (described below) or from the cluster's Settings and Management > Parameters page by clicking Apply Template. For the cluster page approach, see Apply a template.

Before applying, note these constraints:

  • A template can be applied to a maximum of 10 clusters at a time. To cover more clusters, apply in batches.

  • The template must be in the same region as the target clusters. If the clusters are in a different region, create a template in that region first.

  • If any parameter in the template requires a cluster restart, schedule the operation during off-peak hours and make sure your application has a reconnection mechanism.

To apply a template from the Parameter Templates page:

  1. Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.

  2. On the Custom Parameter Templates tab, find the target template and click Apply to Cluster in the Actions column.

  3. On the Apply to Cluster page, select the clusters to apply the template to. Click the Move icon to move them to the right-side list. In the Parameter Comparison section, review the differences between the template values and the current cluster values. Click OK to apply.

    Ensure that the parameters are suitable for the selected clusters. Proceed with caution.

    image

Copy a parameter template

Copying a template creates a new template with the same parameters, which you can then modify independently.

  1. Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.

  2. On the Custom Parameter Templates tab, find the target template and click Clone in the Actions column. Configure the following parameters for the new template, then click OK.

    ParameterDescription
    Template nameA name for the new template. The name must consist of letters, digits, and underscores (_), start with a letter, contain no Chinese characters, and be 8–64 characters in length.
    Database engineThe database engine. Valid values: MySQL.
    Database versionThe MySQL version. Valid values: 8.0, 5.7, 5.6.
    DescriptionAn optional description. Accepts any language. 0–200 characters.
    Add configurationModify parameters as needed. Click Add Parameter to add a row, or Delete to remove one.
    ImportClick Import Parameter to bulk-add parameters in key=value format, one per line.

Delete a parameter template

  1. Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.

  2. On the Custom Parameter Templates tab, find the target template and click Delete in the Actions column.

To delete multiple templates at once, select the templates and click Batch Delete.

Compare parameter templates

Use the comparison feature to review differences between two templates before applying either one.

  1. Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.

  2. On the Custom Parameter Templates tab, select the two templates to compare, then click Compare below the list.

  3. On the Compare page, review the parameter differences between the selected templates.

    image

API reference

APIDescription
CreateParameterGroupCreates a parameter template.
DescribeParameterGroupsQueries a list of parameter templates.
DescribeParameterGroupQueries the details of a parameter template.
ModifyDBClusterParametersModifies cluster parameters or applies a parameter template.
DeleteParameterGroupDeletes a parameter template.