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:
Access to the PolarDB console
At least one PolarDB for MySQL cluster
Create a parameter template
Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.
On the Custom Parameter Templates tab, click Create Parameter Template. Configure the following parameters, then click OK.
Parameter Description Template name A 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 engine The database engine. Valid values: MySQL. Database version The MySQL version. Valid values: 8.0, 5.7, 5.6. Description An optional description for the template. Accepts any language. 0–200 characters. Add configuration Click 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. Import Click Import Parameter to bulk-add parameters in key=valueformat, one parameter per line. Example:wait_timeout=60thread_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:
Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.
On the Custom Parameter Templates tab, find the target template and click Apply to Cluster in the Actions column.
On the Apply to Cluster page, select the clusters to apply the template to. Click the
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.

Copy a parameter template
Copying a template creates a new template with the same parameters, which you can then modify independently.
Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.
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.
Parameter Description Template name A 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 engine The database engine. Valid values: MySQL. Database version The MySQL version. Valid values: 8.0, 5.7, 5.6. Description An optional description. Accepts any language. 0–200 characters. Add configuration Modify parameters as needed. Click Add Parameter to add a row, or Delete to remove one. Import Click Import Parameter to bulk-add parameters in key=valueformat, one per line.
Delete a parameter template
Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.
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.
Log on to the PolarDB console. Select the region where your cluster is located. In the left navigation pane, choose Parameter Templates.
On the Custom Parameter Templates tab, select the two templates to compare, then click Compare below the list.
On the Compare page, review the parameter differences between the selected templates.

API reference
| API | Description |
|---|---|
| CreateParameterGroup | Creates a parameter template. |
| DescribeParameterGroups | Queries a list of parameter templates. |
| DescribeParameterGroup | Queries the details of a parameter template. |
| ModifyDBClusterParameters | Modifies cluster parameters or applies a parameter template. |
| DeleteParameterGroup | Deletes a parameter template. |