Skip to content
New issue

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

Specified key was too long; max key length is 767 bytes at MySqlConnector.Core.ServerSession.ReceiveReplyAsyncAwaited #13650

Closed
9200237 opened this issue Aug 11, 2022 · 2 comments

Comments

@9200237
Copy link

9200237 commented Aug 11, 2022

17:15:07 ERR] Failed executing DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE IdentityServerPersistedGrants (
Key varchar(200) CHARACTER SET utf8mb4 NOT NULL,
Type varchar(50) CHARACTER SET utf8mb4 NOT NULL,
SubjectId varchar(200) CHARACTER SET utf8mb4 NULL,
SessionId varchar(100) CHARACTER SET utf8mb4 NULL,
ClientId varchar(200) CHARACTER SET utf8mb4 NOT NULL,
Description varchar(200) CHARACTER SET utf8mb4 NULL,
CreationTime datetime(6) NOT NULL,
Expiration datetime(6) NULL,
ConsumedTime datetime(6) NULL,
Data varchar(10000) CHARACTER SET utf8mb4 NOT NULL,
Id char(36) COLLATE ascii_general_ci NOT NULL,
ExtraProperties longtext CHARACTER SET utf8mb4 NULL,
ConcurrencyStamp varchar(40) CHARACTER SET utf8mb4 NULL,
CONSTRAINT PK_IdentityServerPersistedGrants PRIMARY KEY (Key)
) CHARACTER SET=utf8mb4;
Unhandled exception. MySqlConnector.MySqlException (0x80004005): Specified key was too long; max key length is 767 bytes at MySqlConnector.Core.ServerSession.ReceiveReplyAsyncAwaited(ValueTask`1 task) in /_/src/MySqlConnector/Core/ServerSession.cs:line 910

@maliming
Copy link
Member

@9200237
Copy link
Author

9200237 commented Aug 11, 2022

set global innodb_file_format = BARRACUDA;
set global innodb_large_prefix = ON;
The above two sentences still do not solve the problem。continue tomorrow

I use mysql-5.6.24, no matter how to do can not solve the problem, today changed to 5.7.36 do not need to do any Settings migration success
And finally, Maliming, thank you for guiding me @maliming

@9200237 9200237 closed this as completed Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants