Skip to content

The Unified and Autonomous Development Platform

Upgrade to support MySQL 8.0

Robin Shen2405f161bb8d
diff --git a/core/pom.xml b/core/pom.xml
index 48bf2d2c6f..295ee12608 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -243,7 +243,12 @@
<version>2.3.0</version>
</dependency>
<dependency>
- <groupId>org.dom4j</groupId>
+ <groupId>mysql-connector-java</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>8.0.12</version>
+ </dependency>
+ <dependency>
+ <groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.0.0</version>
</dependency>
diff --git a/product/system/conf/hibernate.properties b/product/system/conf/hibernate.properties
index 42cf12d036..edd0315999 100644
--- a/product/system/conf/hibernate.properties
+++ b/product/system/conf/hibernate.properties
@@ -1,6 +1,6 @@
#----------------------------------------------------------------------------------
# To use embedded HSQLDB database shipped with OneDev, please uncomment HSQLDB
-# database settings below and comment out settings for other databases.
+# database settings below and comment out settings for other databases
#----------------------------------------------------------------------------------
hibernate.dialect=org.hibernate.dialect.HSQLDialect
@@ -11,14 +11,30 @@ hibernate.connection.password=
#----------------------------------------------------------------------------------
-# To use MySQL/MariaDB database, please follow these steps:
-# 1. Uncomment MySQL/MariaDB settings below and comment out settings for other databases.
-# 2. Create an empty OneDev schema at MySQL/MariaDB side.
+# To use MySQL database, please follow these steps:
+# 1. Uncomment MySQL settings below and comment out settings for other databases
+# 2. Create an empty OneDev schema at MySQL side
# 3. Change the property "hibernate.connection.url", "hibernate.connection.username",
# and "hibernate.connection.password" so that OneDev can connect and write to
-# the database created in step 3.
-# 4. For MySQL, make sure to use "InnoDB" as default storage engine, for MariaDB, make
-# sure to use "XtraDB" or "InnoDB" as the default storage engine.
+# the database created in step 2
+# 4. Make sure to use "InnoDB" as default storage engine
+#----------------------------------------------------------------------------------
+
+#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
+#hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver
+#hibernate.connection.url=jdbc:mysql://localhost:3306/onedev?serverTimezone=UTC&useSSL=false
+#hibernate.connection.username=root
+#hibernate.connection.password=root
+
+
+#----------------------------------------------------------------------------------
+# To use MariaDB database, please follow these steps:
+# 1. Uncomment MariaDB settings below and comment out settings for other databases
+# 2. Create an empty OneDev schema at MariaDB side
+# 3. Change the property "hibernate.connection.url", "hibernate.connection.username",
+# and "hibernate.connection.password" so that OneDev can connect and write to
+# the database created in step 2
+# 4. Make sure to use "XtraDB" or "InnoDB" as the default storage engine
#----------------------------------------------------------------------------------
#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
@@ -46,13 +62,13 @@ hibernate.connection.password=
#----------------------------------------------------------------------------------
# To use Microsoft SQL Server, please follow these steps:
-# 1. Enable tcp/ip access to SQL Server.
+# 1. Enable tcp/ip access to SQL Server
# 2. Uncomment Microsoft SQL Server settings below and comment out settings for
-# other databases.
-# 3. Create an empty database at SQL Server side.
+# other databases
+# 3. Create an empty database at SQL Server side
# 4. Change the property "hibernate.connection.url", "hibernate.connection.username",
# and "hibernate.connection.password" so that OneDev can connect and write to
-# the database created in step 3.
+# the database created in step 3
#----------------------------------------------------------------------------------
#hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
@@ -64,16 +80,16 @@ hibernate.connection.password=
#----------------------------------------------------------------------------------
# To use Oracle, please follow these steps:
-# 1. Uncomment Oracle settings below and comment out settings for other databases.
-# 2. Create an empty Oracle database.
+# 1. Uncomment Oracle settings below and comment out settings for other databases
+# 2. Create an empty Oracle database
# 3. Change the property "hibernate.connection.url", "hibernate.connection.username",
# and "hibernate.connection.password" so that OneDev can connect and write to
-# the database created in step 3.
+# the database created in step 3
# 4. Change property "hibernate.dialect" based on different Oracle versions:
-# 5.1 Use value "org.hibernate.dialect.Oracle9iDialect" if Oracle9i is used.
-# 5.2 Use value "org.hibernate.dialect.Oracle8iDialect" if Oracle8i is used.
+# 5.1 Use value "org.hibernate.dialect.Oracle9iDialect" if Oracle9i is used
+# 5.2 Use value "org.hibernate.dialect.Oracle8iDialect" if Oracle8i is used
# 5.3 Use value "org.hibernate.dialect.Oracle10gDialect" if Oracle10g or 11g is
-# used.
+# used
#----------------------------------------------------------------------------------
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect