This topic describes how to use a parameter template to configure the parameters of ApsaraDB RDS for MySQL instances. ApsaraDB RDS for MySQL provides system parameter templates and custom parameter templates.
Prerequisites
- MySQL 8.0
- MySQL 5.7
- MySQL 5.6
Background information
Introduction to system templates
ApsaraDB RDS for MySQL provides the following system parameter templates for RDS instances that run RDS High-availability Edition or RDS Basic Edition:
- Default parameter template
This parameter template provides the highest data security but requires a longer period of time to take effect. If you use this parameter template, data is replicated in semi-synchronous mode. The following parameter settings are fixed in this parameter template to ensure data security:
- InnoDB
- innodb_flush_log_at_trx_commit = 1
- sync_binlog = 1
- X-Engine (Only the default parameter template is provided.)
sync_binlog = 1
- InnoDB
- Asynchronous parameter template (phased-out)
Note For more information about how to change the data replication mode to asynchronous, see Change the data replication mode of an ApsaraDB RDS for MySQL instance.
- High-performance parameter template
This parameter template provides average data security but can take effect within the shortest period of time. If you select this parameter template, data is replicated in asynchronous mode. The following parameters settings are fixed in this parameter template to ensure data security:
- innodb_flush_log_at_trx_commit = 2
- sync_binlog = 1000
The following table describes the parameters in the system parameter templates.
Parameter | Value | Description |
---|---|---|
innodb_flush_log_at_trx_commit | 1 | When you commit a transaction, the system writes the transaction log record from the buffer to the binary log file and immediately synchronizes the binary log file to the disk. |
2 | When you commit a transaction, the system writes the transaction log record from the buffer to the binary log file but does not immediately synchronize the binary log file to the disk. The binary log file is written to the disk once every second. If the system stops responding before a write operation is performed, the log records that are generated over the most recent second are lost. | |
sync_binlog | 1 | When you commit a transaction, the binary log file is written to the disk and the disk is immediately refreshed. The binary log file is not written to the buffer. |
1000 | The log records in the buffer are written to the disk and the disk is refreshed once every time when 1,000 log records are submitted to the buffer. This may result in data loss. |
Apply a parameter template
Create a custom parameter template
Clone a parameter template
You can clone a parameter template from one region to another region.
Manage parameter templates
Related operations
Operation | Description |
---|---|
Create a parameter template | Creates a parameter template. |
Modify a parameter template | Modifies a parameter template. |
Copy a parameter template | Clones a parameter template from one region to another region. |
Query parameter templates | Queries the parameter templates that are available in a region. |
Query information of a parameter template | Queries the details about a parameter template. |
Delete a parameter template | Deletes a parameter template from a region. |