After you create a PolarDB cluster, you can modify parameters of the cluster in the console and export the modified parameters as templates. You can also apply templates to clusters that are deployed in the same region. This topic describes how to modify parameters of a cluster, export the modified parameters as templates, and apply the templates.

Modify parameters

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Parameters.
  5. Find the parameter for which you want to change the value and click the Icon icon in the Current Value column. In the dialog box that appears, enter the new value and click OK.
    Apply the changes
    Note
    • You must enter the values that meet the requirements described in the Value Range column. Otherwise, an error message appears when you Apply Changes.
    • You can move the pointer over the Parameter icon icon of a parameter to view the details of the parameter.
  6. In the upper-left corner of the page, click Apply Changes. In the Save Changes panel, click OK.
    Save changes
    Note
    • After you Apply Changes for the parameters whose Force Restart values are Yes, the new values take effect only after all nodes in the cluster are restarted. Before the nodes are restarted, we recommend that you must make sure that your services will not be adversely affected. Proceed with caution.
    • For ApsaraDB PolarDB MySQL-compatible edition 8.0 clusters, you can set the innodb_fast_startup parameter to ON to accelerate the restart process.

Apply a parameter template

After you specify the parameters, you can perform the following steps to apply a parameter template:
  • Export the parameter settings of the cluster as a parameter template.
    1. Log on to the PolarDB console.
    2. In the upper-left corner of the console, select the region where the cluster is deployed.
    3. In the left-side navigation pane, click Clusters.
    4. On the Clusters page, click the name of the cluster.
    5. In the left-side navigation pane, choose Settings and Management > Parameters.
    6. Click Export Template.
      Note
      • If you want to modify parameters, we recommend that you first modify parameters and apply changes, and then click Export Template.
      • The parameters in the exported template include the parameters that are manually modified and the parameters that are automatically modified by the running cluster.
    7. In the Apply Template dialog box, set the following parameters.
      Parameter Description
      Template Name The name of the template. The name must meet the following requirements:
      • It can contain letters, digits, and underscores (_). It must start with a letter and cannot contain Chinese characters.
      • It must be 8 to 64 characters in length.
      Description The description of the parameter template. It must be 0 to 200 characters in length.
    8. Click OK.
  • Apply a parameter template to a cluster
    1. Click Apply Template.
    2. In the Apply Template dialog box, select the name of the template that you want to apply and click OK.
      Note
      • You can view the number of parameters, whether a restart is required, and the update time.
      • If a restart is required, we recommend that you apply the parameter template during off-peak hours and make sure that your application is configured to automatically reconnect to the cluster.
      • You can also apply a parameter template to the cluster on the Parameter Templates page. For more information, see Apply a parameter template.

Related API operations

API Description
DescribeDBClusterParameters Queries cluster parameters.
ModifyDBClusterParameters Modifies cluster parameters.