Wiki source code of Configure MariaDB
Last modified by superadmin on 2026/11/25 21:31
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | [[MariaDB>>https://mariadb.org/]] needs the same database, user and [[storage-engine and character-set requirements>>doc:documentation.xs.admin.installation.install-relational-database.configure-mysql.storage-engine-character-set.WebHome]] as MySQL. | ||
| 2 | |||
| 3 | 1. Follow [[Configure MySQL>>doc:documentation.xs.admin.installation.install-relational-database.configure-mysql.WebHome]] from beginning to end, installing MariaDB instead of MySQL — see the [[Database support strategy>>dev:Community.SupportStrategy.DatabaseSupportStrategy]] for the supported versions — with the three substitutions below. | ||
| 4 | 1. Call the ##mariadb## command-line client wherever that procedure calls ##mysql##. The two are the same program: MariaDB 11.0 dropped the ##mysql## name from its container images, where it had been a symbolic link. | ||
| 5 | 1. Copy the MariaDB JDBC driver into ##WEB-INF/lib##, in place of the MySQL one.((( | ||
| 6 | Get [[MariaDB Connector/J>>https://mariadb.com/kb/en/about-mariadb-connector-j/]] from MariaDB or from [[Maven Central>>https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/]]. The JAR file is named ##mariadb-java-client-*.jar##, from the {{code language="none"}}org.mariadb.jdbc:mariadb-java-client{{/code}} artifact. | ||
| 7 | ))) | ||
| 8 | 1. Uncomment the MariaDB configuration block of ##WEB-INF/hibernate.cfg.xml##, rather than the MySQL one, and comment out the other database configurations. It is the same block, with two different values:((( | ||
| 9 | {{code language="xml"}} | ||
| 10 | <property name="hibernate.connection.url">jdbc:mariadb://localhost/xwiki?useSSL=false</property> | ||
| 11 | <property name="hibernate.connection.driver_class">org.mariadb.jdbc.Driver</property> | ||
| 12 | {{/code}} | ||
| 13 | ))) | ||
| 14 | 1. Open your wiki in a browser. XWiki connects to MariaDB, creates its tables on the first start, and serves the wiki without a database error. |