diff --git a/template/Dockerfile b/template/Dockerfile
index f53b550605ddeb9b012892a02154bce3e151a576..53e499030290f8cdfc3b1a8986e37f5178eaf9d8 100644
--- a/template/Dockerfile
+++ b/template/Dockerfile
@@ -62,10 +62,10 @@ RUN rm -rf /usr/local/tomcat/webapps/* && \\
 <% if (db == 'mysql') {
   println "# For MYSQL, download the MySQL driver version from the Maven Central repository since there's no up to "
   println "# date Debian repository for it anymore."
-  println "ENV MYSQL_JDBC_VERSION=\"8.0.22\""
+  println "ENV MYSQL_JDBC_VERSION=\"8.0.23\""
   // Get the SHA256 from the JAR at https://search.maven.org/artifact/mysql/mysql-connector-java and using the
   // command line defined in build.gradle.
-  println "ENV MYSQL_JDBC_SHA256=\"5019defbd12316295e97a6e88f2a9b07f118345a4e982710bba232e499b22f4f\""
+  println "ENV MYSQL_JDBC_SHA256=\"ff7d5b402afd39c12787471505a33a304103b238ec1b7a44e8936d3329da7535\""
   println "ENV MYSQL_JDBC_PREFIX=\"https://repo1.maven.org/maven2/mysql/mysql-connector-java/\${MYSQL_JDBC_VERSION}\""
   println "ENV MYSQL_JDBC_ARTIFACT=\"mysql-connector-java-\${MYSQL_JDBC_VERSION}.jar\""
   println "ENV MYSQL_JDBC_TARGET=\"/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/\${MYSQL_JDBC_ARTIFACT}\""
diff --git a/template/xwiki/hibernate.cfg.xml b/template/xwiki/hibernate.cfg.xml
index 2c2e3f8a0a63698297ee17694c7e1f0133f04c6d..8765173efd5f13894ec4f1a7a17da1fb0b6da0fe 100644
--- a/template/xwiki/hibernate.cfg.xml
+++ b/template/xwiki/hibernate.cfg.xml
@@ -86,7 +86,7 @@
     <property name="connection.url">jdbc:mysql://replacecontainer/replacedatabase?useSSL=false</property>
     <property name="connection.username">replaceuser</property>
     <property name="connection.password">replacepassword</property>
-    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
+    <property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
     <property name="dbcp.poolPreparedStatements">true</property>
     <property name="dbcp.maxOpenPreparedStatements">20</property>