You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice that the entity ClientRedirectUri configured to use ClientId and RedirectUri as primary key, but property of ClientRedirectUri configured to 2000 maxlength. Then we got an error of 'Specified key was too long; max key length is 3072 bytes' when we try to update the database.
It's really not a good idea to use such a long key in database actually.
The text was updated successfully, but these errors were encountered:
hikalkan
changed the title
IdentityServer.EntityFrameworkCore MySQL Error
Reduce IdentityServer table field max lengths since they cause errors on MySQL
Feb 23, 2019
Still some fields stay are 200 maxlength such as in PersistedGrant in ConfigureIdentityServer and in ConfigureAuditLogging which will lead to this error
In the next release, you will need to add a migration if you are using EF Core.
the problem still exists in version 3.1.2(Stable) ,
Here is the mysql character set:
Variable_name Value
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database utf8mb4
character_set_filesystem binary
character_set_results utf8mb4
character_set_server utf8
character_set_system utf8
character_sets_dir /u01/mysql57_20200630/share/charsets/
I solved the problem by changing the DB's variable 'innodb_large_prefix' to ON , the default value is OFF.
I notice that the entity ClientRedirectUri configured to use ClientId and RedirectUri as primary key, but property of ClientRedirectUri configured to 2000 maxlength. Then we got an error of 'Specified key was too long; max key length is 3072 bytes' when we try to update the database.
It's really not a good idea to use such a long key in database actually.
The text was updated successfully, but these errors were encountered: