diff --git a/quarkus/deployment/pom.xml b/quarkus/deployment/pom.xml
index a1fb0321b20..c2a2a30ab37 100644
--- a/quarkus/deployment/pom.xml
+++ b/quarkus/deployment/pom.xml
@@ -54,6 +54,10 @@
io.quarkus
quarkus-jdbc-mariadb-deployment
+
+ io.quarkus
+ quarkus-jdbc-mysql-deployment
+
io.quarkus
quarkus-vertx-web-deployment
diff --git a/quarkus/pom.xml b/quarkus/pom.xml
index e4f7a170719..7b6377811df 100755
--- a/quarkus/pom.xml
+++ b/quarkus/pom.xml
@@ -36,6 +36,7 @@
2.11.2
${jackson.version}
5.4.21.Final
+ 8.0.21
4.5.1
1.20
3.0.0-M5
@@ -91,6 +92,11 @@
snakeyaml
${snakeyaml.version}
+
+ mysql
+ mysql-connector-java
+ ${mysql-connector-java.version}
+
diff --git a/quarkus/runtime/pom.xml b/quarkus/runtime/pom.xml
index 8fa9ffe0a9c..e07f9fed9f8 100644
--- a/quarkus/runtime/pom.xml
+++ b/quarkus/runtime/pom.xml
@@ -55,6 +55,10 @@
io.quarkus
quarkus-jdbc-mariadb
+
+ io.quarkus
+ quarkus-jdbc-mysql
+
io.quarkus
quarkus-core
diff --git a/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java b/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java
index bebe853d5b0..399cb721dca 100644
--- a/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java
+++ b/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java
@@ -124,6 +124,8 @@ public final class PropertyMappers {
return "io.quarkus.hibernate.orm.runtime.dialect.QuarkusH2Dialect";
case "mariadb":
return "org.hibernate.dialect.MariaDBDialect";
+ case "mysql":
+ return "org.hibernate.dialect.MySQL8Dialect";
case "postgres-95":
return "io.quarkus.hibernate.orm.runtime.dialect.QuarkusPostgreSQL95Dialect";
case "postgres": // shorthand for the recommended postgres version
@@ -139,6 +141,8 @@ public final class PropertyMappers {
return "org.h2.jdbcx.JdbcDataSource";
case "mariadb":
return "org.mariadb.jdbc.MySQLDataSource";
+ case "mysql":
+ return "com.mysql.cj.jdbc.MysqlXADataSource";
case "postgres-95":
case "postgres-10":
return "org.postgresql.xa.PGXADataSource";
@@ -152,12 +156,14 @@ public final class PropertyMappers {
return "h2";
case "mariadb":
return "mariadb";
+ case "mysql":
+ return "mysql";
case "postgres-95":
case "postgres-10":
return "postgresql";
}
- throw invalidDatabaseVendor(db, "h2-file", "h2-mem", "mariadb", "postgres", "postgres-95", "postgres-10");
- }, "The database vendor. Possible values are: h2-mem, h2-file, mariadb, postgres95, postgres10.");
+ throw invalidDatabaseVendor(db, "h2-file", "h2-mem", "mariadb", "mysql", "postgres", "postgres-95", "postgres-10");
+ }, "The database vendor. Possible values are: h2-mem, h2-file, mariadb, mysql, postgres95, postgres10.");
create("db", "quarkus.datasource.jdbc.transactions", (db, context) -> "xa", null);
create("db.url", "db", "quarkus.datasource.jdbc.url", (db, context) -> {
switch (db.toLowerCase()) {
@@ -170,6 +176,8 @@ public final class PropertyMappers {
case "postgres-95":
case "postgres-10":
return "jdbc:postgresql://${kc.db.url.host:localhost}/${kc.db.url.database:keycloak}${kc.db.url.properties:}";
+ case "mysql":
+ return "jdbc:mysql://${kc.db.url.host:localhost}/${kc.db.url.database:keycloak}${kc.db.url.properties:}";
}
return null;
}, "The database JDBC URL. If not provided a default URL is set based on the selected database vendor. For instance, if using 'postgres-10', the JDBC URL would be 'jdbc:postgresql://localhost/keycloak'. The host, database and properties can be overridden by setting the following system properties, respectively: -Dkc.db.url.host, -Dkc.db.url.database, -Dkc.db.url.properties.");