You can modify the parameters of a DuckDB-based analytical primary instance and query the modification history in the console. This lets you adjust instance parameters to fit your business requirements. To query the parameter settings of an instance, see View instance parameters.
Precautions
To ensure instance stability, modify only the parameters available in the console. Do not use the
set globalcommand to modify parameters. You cannot modify parameters that are not displayed or editable in the console.When you modify parameter values, refer to the running values on the Modifiable Parameters page in the console. You can also set instance parameters to an expression format to allow the parameters to automatically adapt to changes in the instance configuration.
You must set the
lower_case_table_namesparameter when you create the instance to specify case sensitivity for table names. The default value is 1, which means case-insensitive. You cannot change this parameter after the instance is created.
Modifying parameters may require an instance restart or a database reconnection for the changes to take effect. Perform these operations during off-peak hours. Ensure your application has a reconnection mechanism.
Some parameter modifications require an instance restart to take effect. For details, see the Force Restart column on the Modifiable Parameters page in the console. Restarting the instance will cause a connection interruption of about 30 seconds. Ensure that your application has an automatic reconnection mechanism.
Parameter modifications that do not require an instance restart apply to new database connections. Existing database connections must be disconnected and reconnected for the changes to take effect.
Modify instance parameters
The editable instance parameters vary depending on the MySQL database engine version. For more information, see Editable parameters for ApsaraDB RDS for MySQL.
Modify the parameters of a single instance
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.
In the navigation pane on the left, click Parameters.
You can perform the following operations:
Modify a single parameter
On the Modifiable Parameters tab, find the parameter that you want to modify and change its value:
Click
in the Running Value column and enter a parameter value within the valid value range.In the Running Value column, select a parameter value from the drop-down list.
Click OK.
Click Apply Changes. In the dialog box that appears, select Take Effect Immediately, Take Effect Within the Maintenance Window, or Take Effect at Specified Time, and then click OK.
NoteOn the Scheduled Tasks tab, you can view parameter modification tasks scheduled to Take Effect Within the Maintenance Window or Take Effect at Specified Time.
(Optional) To cancel your changes before they are submitted, click Cancel Changes.
Import and export parameters (TXT format)
To modify many parameters or retrieve the instance parameter configuration, you can export the parameter file in TXT format to your local computer. This file contains all parameter values for the instance. After you modify the parameters, you can import the file to the RDS instance to apply the changes.
Click Export Parameters to export the parameter configuration file in TXT format to your local computer.
After you modify the parameter configuration file, you can click Import Parameters and paste the content of the configuration file into the dialog box.
Click OK.
Click Apply Changes. In the dialog box that appears, select Take Effect Immediately, Take Effect Within the Maintenance Window, or Take Effect at Specified Time, and then click OK.
NoteOn the Scheduled Tasks tab, you can view parameter modification tasks scheduled to Take Effect Within the Maintenance Window or Take Effect at Specified Time.
(Optional) To cancel your changes before they are submitted, click Cancel Changes.
ImportantIf the
Operation failed. The specified parameter format is invalid.error message is displayed, check that the value you specified for the parameter is within its Valid Values.
Modify parameters for multiple instances in a batch
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.
Select the check boxes of the target instances and click Modify Parameters at the bottom of the page.
NoteInstances for batch parameter modification must be of the same engine version and run the same edition. Otherwise, the Modify Parameters button is grayed out.
In the Parameter Settings dialog box, click the
icon next to the current value of the parameter that you want to modify.In the text box of the Current Value column, select or enter a new value, and then click OK.
In the dialog box that appears, confirm the changes and click OK.
Query parameter modification history
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.
In the navigation pane on the left, click Parameters.
Click the Edit History tab.
Select a time range and click OK.
References
FAQ
Parameter effectiveness
Q: Do parameter modifications take effect immediately? Is an instance restart required?
A: Modifications to some parameters take effect in about 5 minutes and do not require an instance restart. Modifications to other parameters take effect only after the instance is restarted. For more information, see the Force Restart column on the Modifiable Parameters tab in the console. Before you submit the parameter changes, you must confirm whether a restart is required.
Q: Why are my parameter modifications not taking effect?
A: Make sure that you click Apply Changes after you set the parameter values. The modification task is executed only after you submit it.
Specific parameters
Q: Why can't I find the
expire_logs_daysorbinlog_expire_logs_secondsparameter in the RDS console?A: In open source MySQL, the
expire_logs_daysandbinlog_expire_logs_secondsparameters are used to control the retention period of binary logs. However, ApsaraDB RDS for MySQL does not use these parameters for this purpose. To modify the retention period of binary logs for an ApsaraDB RDS for MySQL instance, you can configure a retention policy for binary logs in the ApsaraDB RDS console.NoteTo delete or reduce log backups and data backups for an ApsaraDB RDS for MySQL instance, see Delete or reduce backups.
Q: How can I modify the
lower_case_table_namesparameter?A: For more information, see Description of the lower_case_table_names parameter.
Q: How do I resolve the
Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operationerror when using theset globalcommand to modify parameters?A: ApsaraDB RDS for MySQL does not support using the
set globalcommand to modify parameters. You can modify only the parameters that are available in the console. You cannot modify parameters that are not displayed or editable in the console.Q: How can I modify the
collation_connectionandcollation_databaseparameters?A: ApsaraDB RDS for MySQL does not allow you to directly modify the
collation_connectionandcollation_databaseparameters. You can adjust them by setting theinit_connectparameter in the ApsaraDB RDS console. You can set the `init_connect` parameter to values such as'set names utf8mb4','set names utf8','set default_collation_for_utf8mb4=utf8mb4_general_ci','set default_collation_for_utf8mb4=utf8mb4_general_ci;set names utf8mb4','set names utf8mb4 collate utf8mb4_general_ci', or'set names utf8mb4 COLLATE utf8mb4_bin'.After you configure the parameter, the specified command is automatically executed each time a new connection is established. This modifies the character set and collation. However, make sure that your application does not separately adjust the collation for the session. Otherwise, subsequent session-level collation settings in the application will overwrite the current configuration.
Q: Can I modify the
sql_log_binparameter?A: No, you cannot. ApsaraDB RDS for MySQL enforces the
sql_log_binsetting for all sessions by default. This ensures that the binary log records generated by each session are persisted to the disk, which guarantees data consistency for master-replica replication.Q: Why are the changes to the
wait_timeoutparameter not taking effect?A: After you modify the
wait_timeoutparameter, the change takes effect only for new connections. Existing connections must be disconnected and reconnected for the change to take effect.Q: In my RDS instance, the
performance_schemaparameter is enabled, but when I query theperformance_schema.session_connect_attrstable, no records are returned. Why?A: You need to modify the
loose_performance_schema_session_connect_attrs_sizeparameter in the ApsaraDB RDS console and set it to a value greater than 0.