Relational Database Service (MySQL)

Important Parameters

2024-06-21 09:30:29

For the RDS for MySQL instances, you can modify the parameters of a primary instance on the console. However, improperly modifying some important parameters will lead to instance exceptions or data inconsistency. Exercise with caution when modifying them.

lower_case_table_names

Default value: 1

Function: When creating a database or table, you can set whether storage and comparison operations are case-sensitive. This parameter can be set to 0, 1, or 2. If the parameter is set to 0, it indicates that storage and comparison operations are case-sensitive when creating a database or table. If the parameter is set to 2, it indicates that the case is not converted during storage and comparison use lower case when creating a database or table.

At present, RDS for MySQL only supports lower_case_table_names=1 (case-insensitive). The case-sensitive function is expected to be launched in the future. Please keep an eye out for product dynamics.

auto_increment_increment

Default value: 1

Function: It is used as the incremental value of the auto-increment field each time in the AUTO_INCREMENT column. Its value can range from 1 to 65535, and the default value is 1.

auto_increment_offset

Default value: 1

Function: It is used as the start value (offset) of the auto-increment field each time in the AUTO_INCREMENT column. Its value can range from 1 to 65535, and the default value is 1.

sql_mode

Default value: NO_ENGINE_SUBSTITUTION

Function: MySQL can operate in different SQL_MODEs, which define the SQL syntax, data check, etc. that MySQL should support. The default parameter value for versions 5.7 and 8.0 is ONLY_FULL_GROUP_BY,

STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER (no longer supported in versions later than V8.0.11), and NO_ENGINE_SUBSTITUTION, where:

• ONLY_FULL_GROUP_BY means that in a GROUP BY aggregation operation, the column in the SELECT, HAVING, or ORDER BY clause must be a function column that appears in or relies on the GROUP BY column.

• STRICT_TRANS_TABLES enables the strict mode.

• NO_ZERO_IN_DATE means whether the month and day of a date can contain 0 and is subject to the status of the strict mode.

• NO_ZERO_DATE means that dates containing zero dates cannot be inserted into the database and are subject to the status of the strict mode.

• ERROR_FOR_DIVISION_BY_ZERO means that in the strict mode, if data is divided by zero during the INSERT or UPDATE process, an error rather than a warning will be reported, while in the non-strict mode, NULL will be returned.

• NO_AUTO_CREATE_USER (no longer supported in versions later than V8.0. 11) prohibits GRANT from creating a user whose password is empty.

• NO_ENGINE_SUBSTITUTION means that if the used storage engine is disabled or not compiled, an error will be reported.

R.1twGpBgJEW