All Products
Search
Document Center

ApsaraDB RDS:Modify instance parameters

Last Updated:Oct 16, 2024

This topic describes how to modify the parameters of an ApsaraDB RDS for MySQL instance and view the parameter modification history in the ApsaraDB RDS console or by calling an API operation to meet your business requirements. For more information about how to view the parameter settings of an RDS instance, see View the parameters of an ApsaraDB RDS for MySQL instance.

Usage notes

  • To ensure the stability of your RDS instance, you can modify only the parameters that are displayed and modifiable in the ApsaraDB RDS console.

  • When you modify the parameters of your RDS instance, you can view the value range of each parameter in the Value Range column on the Modifiable Parameters tab of the Parameters page in the ApsaraDB RDS console. You can use expressions as the values of parameters. This way, the values of the parameters dynamically change when the instance specifications change. For more information, see Use expressions as parameter values.

  • If read-only RDS instances are attached to a primary RDS instance, the modifications to some parameters of the primary RDS instance are automatically synchronized to the read-only RDS instances. For more information, see Appendix: Parameters to be synchronized to read-only RDS instances.

  • In MySQL 8.0, the value of the lower_case_table_names parameter is fixed as 1.

Important

The modification of some parameters takes effect only after you restart or reconnect to your RDS instance. We recommend that you modify parameters during off-peak hours and make sure that your application is configured to automatically reconnect to your RDS instance.

  • The modification of some parameters takes effect only after you restart your RDS instance. You can check the values in the Force Restart column on the Modifiable Parameters tab of the Parameters page in the ApsaraDB RDS console to identify the parameters. When you modify the parameters, you are prompted to restart the RDS instance.

  • The modification of some parameters takes effect on new connections to your RDS instance only after you reconnect to the RDS instance. You must disconnect and then reconnect to the RDS instance for the new values of the parameters to take effect.

Modify parameters

Modify the parameters of an RDS instance

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane, click Parameters.

  3. Perform the following operations:

    Modify a single parameter

    1. On the Modifiable Parameters tab, find the parameter that you want to modify and change its value based on your business requirements.

      • In the Running Value column, click the 铅笔 icon. In the dialog box that appears, enter the new value based on the value range of the parameter.

      • Select a parameter value from the drop-down list in the Running Value column.

    2. Click OK.

    3. Click Apply Changes. In the dialog box that appears, select the time range during which you want the new parameter settings to take effect. You can select Take Effect Immediately, Take Effect Within Maintenance Window, or Take Effect at Specified Time.

    4. Optional. If you want to revoke the modifications before you apply the new parameter values, click Cancel Changes.

    Apply and export a parameter template

    Apply a parameter template to instances

    The system provides various system parameter templates to meet the requirements of different business scenarios, such as scenarios in which you require high performance. You can also create custom parameter templates to configure multiple parameters at a time. For more information, see Use a parameter template.

    1. On the Modifiable Parameters tab, click Apply Template.

    2. In the Apply Template dialog box, select the parameter template that you want to use and click OK.

      Note
      • You can view the number of parameters in the parameter template and check whether you must restart the RDS instance for the new values of the parameters to take effect. You can also click View Parameter Change to view the changes in the values of the parameters in the parameter template.

      • If you cannot find the parameter template that you want to use, you must check whether the parameter template resides in the same region as the RDS instance. If the parameter template and the RDS instance reside in different regions, you can replicate the parameter template to the region where the RDS instance resides. For more information, see Use a parameter template.

    Export Parameter Template

    1. On the Modifiable Parameters tab, click Export as Template.

    2. Configure the following parameters.

      Parameter

      Description

      Template Name

      Enter a template name. The name must be 8 to 64 characters in length and can contain letters, digits, dots (.), and underscores (_). The name must start with a letter.

      Description

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

    3. Click OK. A parameter template is created in the region.

    Import and export parameters in the TXT format

    If you want to modify a large number of parameters or obtain instance parameter configurations, you can export a parameter file in the TXT format to your computer. The TXT file contains all parameter values of the RDS instance. After you modify the parameters, you can import the file to the RDS instance to apply the parameter changes.

    1. Click Export Parameters to export the parameter file in the TXT format to your computer.

    2. Modify the required parameters in the file, click Import Parameters, and then paste the file content to the dialog box.

    3. Click OK.

    4. Click Apply Changes. In the dialog box that appears, select the time range during which you want the new parameter settings to take effect. You can select Take Effect Immediately, Take Effect Within Maintenance Window, or Take Effect at Specified Time.

    5. Optional. Before the new parameter values are applied, you can click Cancel Changes to revoke the changes.

      Important

      If an error message that indicates invalid parameter formats appears, you must check whether the new parameter value is within the value range of the parameter.

Modify the parameters of multiple RDS instances at a time

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the RDS instance resides.

  2. Select the RDS instances for which you want to modify parameters and click Modify Parameters below the instance list.

    Note

    The RDS instances must run the same database engine version and RDS edition. Otherwise, the Modify Parameters button is dimmed.

  3. In the Parameter Settings dialog box, click the 编辑 icon on the right of the parameter that you want to modify.

  4. In the Current Value column, select or enter a new value. Then, click OK.

  5. In the Parameter Settings dialog box, confirm the new value and click OK.

View the parameter configuration history

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane of the page that appears, click Parameters.

  3. On the page that appears, click the Edit History tab.

  4. Select a time range and click OK.

FAQ

  • After I modify the parameters of my RDS instance, does the modification immediately take effect? Do I need to restart my RDS instance?

    After you modify the parameters of your RDS instance, the new values of some parameters take effect in approximately 5 minutes even if you do not restart your RDS instance. However, the new values of some parameters take effect only after you restart your RDS instance. For more information, view the Force Restart column on the Editable Parameters tab of the Parameters page in the ApsaraDB RDS console.

  • After I modify the parameters of my RDS instance, why do the new values of the parameters not take effect?

    Make sure that you click Apply Changes after you modify the parameters.

  • If a read-only RDS instance runs RDS High-availability Edition, how do I configure parameters for the primary and secondary read-only instances?

    You need only to configure parameters for the primary read-only instance. The parameter settings of the primary read-only instance are automatically synchronized to the secondary read-only instance. You cannot modify the parameters of a secondary read-only instance.

Appendix: Parameters to be synchronized to read-only RDS instances

If read-only RDS instances are attached to a primary RDS instance, the modifications to some parameters of the primary RDS instance are automatically synchronized to the read-only RDS instances. The following list provides these parameters.

  • lower_case_table_names

    Note

    If your RDS instance runs MySQL 8.0, you cannot change the value of this parameter.

  • innodb_large_prefix

  • loose_validate_password_length

  • default_time_zone

  • rpl_semi_sync_slave_enabled

Related API operations

Operation

Description

ModifyParameter

Modifies the parameters of an instance.

DescribeParameterTemplates

Queries the parameter templates that are available for an instance.

DescribeParameters

Queries the parameter settings of an instance.