Wiki source code of MariaDB Installation
Last modified by Eleni Cojocariu on 2026/07/13 22:37
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{warning}} | ||
| 2 | WIP: Page being refactored at [[Configure MariaDB>>doc:documentation.xs.admin.installation.methods.install-xwiki-war.install-relational-database.configure-mariadb.WebHome]]. | ||
| 3 | {{/warning}} | ||
| 4 | |||
| 5 | = Compatibility Considerations = | ||
| 6 | |||
| 7 | See [[Database support strategy>>dev:Community.DatabaseSupportStrategy]] for the supported versions. | ||
| 8 | |||
| 9 | XWiki expects the database to use ##utf8## or ##utf8mb4## encoding with collation ##*_bin## and it's highly recommended to use ##utf8mb4## (and ##utf8mb4_bin##). | ||
| 10 | |||
| 11 | == MariaDB versions older than 10.2 == | ||
| 12 | |||
| 13 | If you use ##utf8mb4## encoding you won't be able to use version of MariaDB older than 10.2 out of the box because of a limitation in the default maximum size of the keys and the default row format. | ||
| 14 | |||
| 15 | = Installation Steps = | ||
| 16 | |||
| 17 | In general you should follow the instructions for [[installing MySQL>>InstallationMySQL]] since MariaDB is supposed to be a drop-in replacement for MySQL. | ||
| 18 | |||
| 19 | Here are the differences with the MySQL installation: | ||
| 20 | |||
| 21 | * Download and install [[MariaDB>>https://mariadb.org/]], using a [[supported version>>dev:Community.DatabaseSupportStrategy]] | ||
| 22 | * You need to have the MariaDB JDBC Driver JAR (named ##mariadb-java-client-*.jar##) installed in XWiki's WAR file. If this file isn't present in XWiki's ##WEB-INF/lib## directory you'll need to download it and copy it there. You can download it from the [[MariaDB Connector/J Driver page>>https://mariadb.com/kb/en/about-mariadb-connector-j/]] or directly from the [[Maven Central Repository>>https://search.maven.org/artifact/org.mariadb.jdbc/mariadb-java-client]]. | ||
| 23 | * You need to tell XWiki to use MariaDB. To do this, edit the ##WEB-INF/hibernate.cfg.xml## file where you have expanded the XWiki WAR file and replace the matching properties with the following ones:((( | ||
| 24 | {{code language="xml"}} | ||
| 25 | <property name="connection.url">jdbc:mariadb://localhost/xwiki?useSSL=false</property> | ||
| 26 | <property name="connection.username">xwiki</property> | ||
| 27 | <property name="connection.password">xwiki</property> | ||
| 28 | <property name="connection.driver_class">org.mariadb.jdbc.Driver</property> | ||
| 29 | <property name="connection.useUnicode">true</property> | ||
| 30 | <property name="connection.characterEncoding">UTF-8</property> | ||
| 31 | {{/code}} | ||
| 32 | ))) |