Help Center/ GaussDB(for MySQL)/ User Guide/ Parameter Management/ Modifying Parameters of a DB Instance
Updated on 2024-09-24 GMT+08:00

Modifying Parameters of a DB Instance

You can modify parameters of a DB instance to optimize performance if needed.

Precautions

  • To ensure DB instance stability, you can only modify the parameters that are available on the console.
  • To apply certain parameter modifications, you need to reboot the DB instance. After you modify a parameter value, check the value in the Effective upon Reboot column. You are advised to perform the operation during peak-off hours.
    Figure 1 Parameter list
  • The value of validate_password.length cannot be smaller than that of validate_password.number_count+validate_password.special_char_count+(2 * validate_password.mixed_case_count). Otherwise, validate_password.length is automatically set to the configured minimum value when the parameter template is applied.
  • If you create a DB instance and apply a custom parameter template, the value of validate_password.length cannot be greater than 16. Otherwise, the DB instance fails to be created.
  • If you create a DB instance and apply a custom parameter template, the values of validate_password.mixed_case_count, validate_password.number_count, and validate_password.special_char_count cannot exceed 4. Otherwise, the DB instance may fail to be created. The default value 1 is recommended.
  • The value of rds_compatibility_mode depends on the GaussDB(for MySQL) kernel version.

Modifying Parameters of a DB Instance

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Parameters. On the displayed page, modify parameters as required.

    Figure 2 Modifying parameters of a DB instance

    • To save the modifications, click Save. In the displayed dialog box, click Yes.
    • To cancel the modifications, click Cancel.
    • To preview the modifications, click Preview.

  6. After the parameters are modified, click Change History to view the modification records.

    Figure 3 Viewing the modification records

Modifying Parameters in a Parameter Template

GaussDB(for MySQL) provides parameter templates. You can modify a custom parameter template to set parameters in batches.

  1. In the navigation pane, choose Parameter Templates. On the Custom Templates tab, click the parameter template name.
  2. On the displayed Parameters page, modify parameters as required.

    Figure 4 Modifying parameters in a parameter template
    • To save the modifications, click Save. In the displayed dialog box, click Yes.
    • To cancel the modifications, click Cancel.
    • To preview the modifications, click Preview.

  3. After the parameters are modified, click Change History to view the modification records.
  4. After a parameter template is modified, it will not take effect until the template is applied to DB instances. On the Parameter Templates page, locate the parameter template you want to apply and choose More > Apply in the Operation column.

    Figure 5 Applying a parameter template to a DB instance

  5. Select one or more DB instances and click OK.

    Figure 6 Selecting DB instances

  6. After the parameter template is applied, click a DB instance and check whether the parameters have been modified on the Parameters page.

Common Parameters

Table 1 Common parameters

Parameter

Description

Reference

time_zone

The time zone of the server.

How Do I Change the Time Zone?

default_password_lifetime

The global automatic password expiration policy, in days.

How Do I Configure a Password Expiration Policy for GaussDB(for MySQL) Instances?

character_set_server

The server character set.

How Do I Use the utf8mb4 Character Set to Store Emojis in a GaussDB(for MySQL) Instance?

collation_server

Specifies the collation for the character set of the server. The collation must match the character set specified by character_set_server. Otherwise, the database cannot be started or restarted.

-

group_concat_max_len

The maximum permitted result length in bytes for the GROUP_CONCAT() function.

-

max_connections

The maximum number of concurrent client connections. If this parameter is set to default, the parameter value depends on how much memory there is.

What Is the Maximum Number of Connections to a GaussDB(for MySQL) Instance?

max_prepared_stmt_count

Limits the total number of prepared statements in the server. Too many statements may cause the server to run out of memory (OOM) and risk denial-of-service attacks. Configure this parameter as needed.

-

innodb_flush_log_at_trx_commit

Controls the balance between strict ACID compliance for commit operations, and higher performance that is possible when commit-related I/O operations are rearranged and done in batches. When this parameter is set to 0, the content of the InnoDB log buffer is written to the log file approximately once per second and the log file is flushed to disk. The default value of 1 is required for full ACID compliance. With this value, the contents of the InnoDB log buffer are written out to the log file at each transaction commit and the log file is flushed to disk. When this parameter is set to 2, the contents of the InnoDB log buffer are written to the log file after each transaction commit and the log file is flushed to disk approximately once per second.

Suggestions on GaussDB(for MySQL) Parameter Tuning

sql_mode

Sets the SQL server mode.

-

binlog_expire_logs_seconds

Sets the binary log expiration period in seconds. After their expiration period ends, binary log files can be automatically removed.

-