Set cluster parameters and node parameters

Updated at:

After you create a PolarDB cluster, you can modify cluster and node parameters in the console and export the modified cluster parameters as a template. Clusters in the same region can use the template application feature to quickly modify cluster parameters. This topic describes how to modify cluster and node parameters, and how to export the modified cluster parameters as a template and apply the template.

Background information

PolarDB provides configurable node parameters. You can configure node parameters based on your business requirements.

  • New nodes added to a cluster use cluster parameters by default.

  • If the primary node fails and is switched to a read-only node:

    • The original primary node becomes a read-only node, and its parameters remain unchanged.

    • An original read-only node is promoted to the primary node, and its parameters remain unchanged.

  • If the primary zone fails, a node in the secondary zone is promoted to the primary node and uses the cluster parameters.

Usage notes

  • For compatibility with MySQL configuration files, all cluster parameters in the PolarDB console use the loose_ prefix.

    Example: loose_rds_audit_log_event_buffer_size and rds_audit_log_event_buffer_size are the same parameter.

  • Only some node parameters or parameter values can be modified. For more information, see the supported options in the console.

  • To view the parameter modification history, use the Parameters tab of the Parameter Modification History page in the console, or call the DescribeModifyParameterLog operation.

  • To modify a node parameter that you cannot modify in the console, go to Quota Center. Find the quota named Set cluster parameters and node parameters, in the Actions column, click Apply, and then enter the cluster ID and the parameters that you want to modify in the Reason for Request field.

    Note
    • Currently, only the following parameters can be modified:

      • PolarDB for MySQL 5.6 and 5.7: the node parameter innodb_buffer_pool_size.

      • PolarDB for MySQL 8.0: the node parameters innodb_buffer_pool_size, loose_oss_outfile_buffer_size, loose_max_oss_outfile_threads, loose_csv_oss_buff_size.

    • If you have questions or need to modify other parameters, Contact Us.

Modify parameter values

Changes to cluster parameters affect all nodes in the cluster. Changes to node parameters affect only the specified node. This section provides an example of how to modify cluster parameters.

  1. Log in to the PolarDB console。

  2. In the upper-left corner, select the region where the cluster is deployed.

  3. Find the target cluster and click its ID.

  4. In the left-side navigation pane, choose Settings and Management > Parameters.

  5. To modify cluster parameters, select Cluster from the drop-down list in the upper-left corner.

    To modify node parameters, select the node from the drop-down list.

  6. In the upper-left corner of the page, click Modify Parameter.

  7. Find the parameter and enter a new value.

    Note
    • You must enter a value within the range specified in the Range to Be Modified column. Otherwise, an error occurs when you click Submit Changes.

    • You can click the Parameter icon icon next to a parameter name to view its details.

    • For compatibility, the "loose_" prefix is used for parameters in the console. For example, "loose_rds_audit_log_event_buffer_size" and "rds_audit_log_event_buffer_size" are the same parameter.

  8. In the upper-left corner, click Submit Changes.

  9. Go to Save Changes page, select the nodes to update and click OK.

    The parameter change table in the dialog box includes the Parameter, New Value, Current Value, Default Value, and Global Parameter columns. You can quickly adjust parameters by clicking Set All to Current Value or Set All to Default Value. When you modify a global parameter, all nodes are selected by default.

    Note
    • For parameters whose Force Restart value is Yes, you must restart all nodes in the cluster for the new parameter values to take effect. Before you restart the cluster, plan for this downtime and proceed with caution.

    • If your PolarDB for MySQL cluster is version 8.0, you can also set the innodb_fast_startup parameter to ON to accelerate the restart.

Apply a parameter template

After you configure parameters, you can do the following:

  • Export the cluster parameters 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 located.

    3. Find the target cluster and click its ID.

    4. In the left-side navigation pane, click Settings and Management > Parameters.

    5. Click Export as Template.

      Note
      • If you want to change parameters in the current list, modify them first, and then click Export as Template.

      • The exported parameter template includes parameters you manually modified and those that the cluster automatically adjusted during runtime.

    6. In the Apply Template dialog box, configure the following parameters.

      Parameter

      Description

      Template Name

      The template name, which must meet the following requirements:

      • It must start with a letter and can contain only letters, digits, and underscores (_).

      • It must be 8 to 64 characters in length.

      Description

      Enter a description for the template. The description can be 0 to 200 characters in length.

    7. 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 parameter template that you want to use and click OK.

      Note
      • You can view the number of parameters in the template, whether a restart is required, and the update time.

      • If the parameter template contains parameters that require a cluster restart, perform this operation during off-peak hours and ensure that your application has a reconnection mechanism.

      • You can also apply a parameter template to a cluster on the parameter template page. For more information, see Apply a parameter template.

Compare node parameters

You can use the Compare feature to compare parameter configurations between different nodes.

  1. Log in to the PolarDB console。

  2. In the upper-left corner, select the region where the cluster is deployed.

  3. Find the target cluster and click its ID.

  4. In the left-side navigation pane, choose Settings and Management > Parameters.

  5. In the upper-left corner of the page, click Compare.

    In the Parameter Comparison panel on the right, select the nodes to compare (for example, primary node and read-only node), and view the comparison results such as the number of different parameters and whether restart-required parameters are included.

  6. Review the comparison results for the selected nodes.

FAQ

How do I view the current system time and time zone of a cluster?

You can run SQL statements to view the current system time and time zone settings of the cluster. We recommend that you verify the current configuration before changing the time zone.

  1. Run the following statement to view the current system time.

    SELECT SYSDATE();

    Sample output:

    +---------------------+
    | SYSDATE()           |
    +---------------------+
    | 2026-07-08 04:00:03 |
    +---------------------+
  2. Run the following statement to view the time zone settings.

    SHOW GLOBAL VARIABLES LIKE '%time_zone%';

    Sample output:

    +------------------+--------+
    | Variable_name    | Value  |
    +------------------+--------+
    | system_time_zone | CST    |
    | time_zone        | SYSTEM |
    +------------------+--------+

    The following variables are returned:

    • system_time_zone: the system time zone of the operating system on which the cluster runs, such asCST.

    • time_zone: the time zone that currently takes effect, such asSYSTEM, which indicates that the cluster follows the time zone of the operating system.

How do I change the time zone of a cluster?

Go toSettings and Management>Parameterspage, and then search for and modify thedefault_time_zoneparameter. You can set this parameter toSYSTEM, a time zone offset such as+8:00, or a named time zone such asPRC,Asia/Shanghai. You must restart the cluster for the change to take effect.

API reference

Description

DescribeDBClusterParameters

Queries the parameters of a cluster.

ModifyDBClusterParameters

Modifies the parameters of a cluster.

ModifyDBClusterAndNodesParameters

Modifies cluster parameters and applies the changes to specified nodes.

ModifyDBNodesParameters

Modifies the parameters of one or more specified nodes.

DescribeParameterTemplates

Queries a list of default parameter templates.

DescribeModifyParameterLog

Queries the parameter modification history of a cluster.