无法使用 "lower_case_table_names=1" 创建新的 RDS MySQL 数据库实例
Can not create a new RDS MySQL DB instance with "lower_case_table_names=1"
我正在尝试使用 "lower_case_table_names=1" 创建一个新的 MySQL v8.0.11 RDS 数据库实例。
数据库的创建被卡住了,在日志中我可以看到以下错误:
"Different lower_case_table_names settings for server ('1') and data dictionary ('0')."
有人经历过这个吗?
请帮忙。
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lower_case_table_names
It is prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized. The restriction is necessary because collations used by various data dictionary table fields are based on the setting defined when the server is initialized, and restarting the server with a different setting would introduce inconsistencies with respect to how identifiers are ordered and compared.
这是一个关于 AWS 支持该选项的问题。这取决于他们如何初始化 RDS 实例。我猜他们克隆了一个预初始化的 InnoDB 表空间的映像,而不是初始化一个新的表空间。
Amazon RDS 支持定义数据库引擎设置的参数组。
MySQL 8 的参数组包括 lower_case_table_names
的设置:
您应该配置此参数组,然后使用该参数组启动 RDS 集群。
参见:Working with DB Parameter Groups - Amazon Relational Database Service
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.KnownIssuesAndLimitations.html
lower_case_table_names
由于 Amazon RDS 使用区分大小写的文件系统,因此不支持将 lower_case_table_names 服务器参数的值设置为 2(“名称按给定存储但以小写形式进行比较”)。以下是 MySQL 个数据库实例的 Amazon RDS 支持的值:
0(“按给定方式存储的名称和比较区分大小写”)所有 Amazon RDS 都支持 MySQL 版本。
1(“以小写形式存储的名称和比较不区分大小写”)Amazon RDS 支持 MySQL 版本 5.5、版本 5.6、版本 5.7 和版本 8.0.19 以及更高的 8.0 版本.
在创建数据库实例之前,应将 lower_case_table_names 参数设置为自定义数据库参数组的一部分。您应该避免更改现有数据库实例的 lower_case_table_names 参数,因为这样做可能会导致与时间点恢复备份和只读副本数据库实例不一致。
只读副本应始终使用与源数据库实例相同的 lower_case_table_names 参数值。
我正在尝试使用 "lower_case_table_names=1" 创建一个新的 MySQL v8.0.11 RDS 数据库实例。
数据库的创建被卡住了,在日志中我可以看到以下错误:
"Different lower_case_table_names settings for server ('1') and data dictionary ('0')."
有人经历过这个吗?
请帮忙。
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lower_case_table_names
It is prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized. The restriction is necessary because collations used by various data dictionary table fields are based on the setting defined when the server is initialized, and restarting the server with a different setting would introduce inconsistencies with respect to how identifiers are ordered and compared.
这是一个关于 AWS 支持该选项的问题。这取决于他们如何初始化 RDS 实例。我猜他们克隆了一个预初始化的 InnoDB 表空间的映像,而不是初始化一个新的表空间。
Amazon RDS 支持定义数据库引擎设置的参数组。
MySQL 8 的参数组包括 lower_case_table_names
的设置:
您应该配置此参数组,然后使用该参数组启动 RDS 集群。
参见:Working with DB Parameter Groups - Amazon Relational Database Service
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.KnownIssuesAndLimitations.html
lower_case_table_names 由于 Amazon RDS 使用区分大小写的文件系统,因此不支持将 lower_case_table_names 服务器参数的值设置为 2(“名称按给定存储但以小写形式进行比较”)。以下是 MySQL 个数据库实例的 Amazon RDS 支持的值:
0(“按给定方式存储的名称和比较区分大小写”)所有 Amazon RDS 都支持 MySQL 版本。
1(“以小写形式存储的名称和比较不区分大小写”)Amazon RDS 支持 MySQL 版本 5.5、版本 5.6、版本 5.7 和版本 8.0.19 以及更高的 8.0 版本.
在创建数据库实例之前,应将 lower_case_table_names 参数设置为自定义数据库参数组的一部分。您应该避免更改现有数据库实例的 lower_case_table_names 参数,因为这样做可能会导致与时间点恢复备份和只读副本数据库实例不一致。
只读副本应始终使用与源数据库实例相同的 lower_case_table_names 参数值。