[keycloak-dev] Support for MySQL 8

Cristian Camilo Lopez Vidal ckl86 at hotmail.com
Sat May 12 22:03:41 EDT 2018


Greetings,

I am migrating an app to MySQL 8 and I found some issues while migrating Keycloak (I’d like to have it in the same DB version, it's optional though).
In order to do fix the issues with Keycloak I forked the keycloak docker images repo and I upgraded the JDBC driver dependency to 5.1.46 and I was able to connect to MySQL 8 but I got some issues because of the strict row size limits.
The concrete error messages is
"
Error: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs [Failed SQL: ALTER TABLE keycloak.REALM MODIFY CERTIFICATE VARCHAR(4000)]:
“
The MySQL documentation reference to this issue is https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html

Then I forked the main Keycloak repo and I changed the liquibase migrations to use TEXT types instead of multiple big VARCHAR types for example VARCHAR(4000).

I ran the test suite against the MySQL 8 database as stated here https://github.com/keycloak/keycloak/blob/master/misc/DatabaseTesting.md and everything worked fine.

I posted two pull requests in GitHub to propose this change, is there anything else I should do to promote this change.

Docker Image PR: https://github.com/jboss-dockerfiles/keycloak/pull/115

Keycloak Source PR: https://github.com/keycloak/keycloak/pull/5201

Looking forward to include this before the version 4 release is done.

Thanks,

Cristhian


More information about the keycloak-dev mailing list