We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux
Docker Compose
No response
docker compose 安装用外部的数据库,新建数据的时候 字符集如果是utf8mb4的话 系统初始化数据库会失败。
Caused by: io.r2dbc.spi.R2dbcBadGrammarException: Specified key was too long。
由于 MySQL Innodb 引擎表索引字段长度的限制为 767 字节,因此对于多字节字符集的大字段(或者多字段组合索引),创建索引会出现上面的错误。 以 utf8mb4 字符集 字符串类型字段为例:utf8mb4 是 4 字节字符集,则默认支持的索引字段最大长度是: 767 字节 / 4 字节每字符 = 191 字符,因此在 varchar(255) 或 char(255) 类型字段上创建索引会失败。
The text was updated successfully, but these errors were encountered:
Thank @Beihaiyumao for reaching out here!
/kind improvement /area docs
Sorry, something went wrong.
No branches or pull requests
系统信息
linux
使用的哪种方式运行?
Docker Compose
在线站点地址
No response
发生了什么?
docker compose 安装用外部的数据库,新建数据的时候 字符集如果是utf8mb4的话 系统初始化数据库会失败。
Caused by: io.r2dbc.spi.R2dbcBadGrammarException: Specified key was too long。
由于 MySQL Innodb 引擎表索引字段长度的限制为 767 字节,因此对于多字节字符集的大字段(或者多字段组合索引),创建索引会出现上面的错误。
以 utf8mb4 字符集 字符串类型字段为例:utf8mb4 是 4 字节字符集,则默认支持的索引字段最大长度是: 767 字节 / 4 字节每字符 = 191 字符,因此在 varchar(255) 或 char(255) 类型字段上创建索引会失败。
方案-修改字符集为utf8 即可。如果有可能的话希望能在文档上标注一下 纯小白的话 可能会卡死在这里
相关日志输出
No response
附加信息
No response
The text was updated successfully, but these errors were encountered: