This topic describes how to use a parameter template to manage the parameters of an ApsaraDB for RDS instance. ApsaraDB RDS for MySQL provides system parameter templates and custom parameter templates.
Prerequisites
- MySQL 8.0
- MySQL 5.7
- MySQL 5.6
Background information
System template introduction
ApsaraDB RDS for MySQL on High-availability Edition and Basic Edition instances can use the following system parameter templates:
- Default parameter template
It ensures the highest data security but costs more time. Data is semi-synchronously replicated. The parameters are specified with the following values to protect data:
- 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
It ensures high data security and fast speed. Data is asynchronously replicated. The parameters are specified with the following values to protect data:
- innodb_flush_log_at_trx_commit = 1
- sync_binlog = 1
- High-performance parameter template
It ensures average data security but is less time-intensive to implement. Data is asynchronously replicated. The parameters are specified with the following values to protect data:
- 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 from the buffer to the log file and synchronizes the log file to the disk immediately. |
2 | When you commit a transaction, the system writes the transaction log from the buffer to the log file but does not immediately synchronize the log file to the disk. The log file is written to the disk every second. If the system stops responding before a write operation is performed, logs generated within the last second will be 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 log file is not written to the buffer. |
1000 | The buffer is written to the disk and the disk is refreshed whenever 1,000 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 the current region to another region.
Manage parameter templates
Related operations
API | Description |
---|---|
Create a parameter template | Creates an ApsaraDB for RDS parameter template. |
Modify a parameter template | Modifies an ApsaraDB for RDS parameter template. |
Copy a parameter template | Clones an ApsaraDB for RDS parameter template from one region to another. |
Query parameter templates | Queries the ApsaraDB for RDS parameter templates available within a region. |
Query information of a parameter template | Queries an ApsaraDB for RDS parameter template. |
Delete a parameter template | Deletes an ApsaraDB for RDS parameter template. |