MariaDB instead of MySQL
Asked by Victor Williams:

Title says it all. Has anyone successfully ran Mariadb instead of mysql with Confluence 5.x?


Answers:
author: Bryan Deter
body: I've gotten this to work with Confluence 5.1.3.

When configuring the database:

* Use **net.sf.hibernate.dialect.MySQLDialect** as the hibernate dialect (note that Hibernate 2, not 3, is being used; this was my biggest issue)
* Use **org.mariadb.jdbc.Driver** as the JDBC driver
* Use a standard mysql connection string (**jdbc:mysql://localhost:3306/confluence?useUnicode=true\&characterEncoding=UTF8\&sessionVariables=storage_engine=InnoDB** for my install with the database on the same machine)
* Use your normal username and password

I just got this set up, but everything appears to be functioning properly at this point.

I'm in full agreement that MariaDB should be looked into more as a viable replacement for MySQL. It should be interesting seeing what happens as distributions switch over to it.

comments: author: Radu Dumitriu
body: I'm not allowed to vote twice. +1


author: Matt Petrowsky
body: I just tried updating from a 5.1.5 install to 5.2.3. The DB is currently a MariaDB 5.5.23 install and was working fine with mysql-connector-java-5.1.11.jar driver.

When trying to run with mariadb-java-client-1.1.2.jar and the above settings I couldn't get a successful db update.

If anyone has further information about more recent confluence updates and if you've gotten mariadb to update then that would be great.


author: Bryan Deter
body: @Matt what ordering did everything happen for you? Did you start with an installation with the mysql connector and then switched to the maria connector, or was it something else?

If you want to follow this issue further, take a look at <https://jira.atlassian.com/browse/CONF-29060> which is the issue tracking formal testing/support for it. They are also looking at it for JIRA.


author: Devon Jobes
body: @Bryan Deter Where do you change the "net.sf.hibernate.dialect" settings?


author: Robin Niel
body: It worked for me as well on JIRA v7.1.6.

I didn't find any mention of the hibernate dialect in the JIRA conf files, though.

I also applied de default install for MySQL, part of the Mysql configuration for Jira:

sudo vi /etc/my.cnf.d/server.cnf  
\> default-storage-engine=INNODB

Thx, Robin


author: ctramnitz
body: I this still supposed to work with Confluence 6.6.x?

I'm getting 500 when installing on MariaDB...

Where do you change the Hibernate MySQL dialect settings before/during install? I think it's supposed to be in confluence.cfg.xml in the end, but that is not good during install.


author: Nic Brough -Adaptavist-
body: Nope. MariaDB is not supported, and the instructions above would need to be updated.

I'd strongly recommend not using Maria, and just go with MySQL or PostGres.


author: ctramnitz
body: Actually, I've got it working. My main problem was completely unrelated to MariaDB, but 'binlog_format = row' was missing.

In combination with the latest mysql-connector (5.1.45) I didn't have any problems (no hibernate modification, no mariadb-client) with a fresh Confluence 6.6.1 install on CentOS 7.4 using MariaDB 5.5.56. All DB checks show up as green.

I know it's unsupported, but so is most of open-source. But Jira and Confluence are paid products. If Atlassian cannot adapt to such trivial changes I'll ditch them before the next renewal.


author: Nic Brough -Adaptavist-
body: Postgresql is top of the recommendation list for databases for Atlassian systems, it's the most widely used, it's the one Atlassian develop against, and it is open source.

MariaDB is not a "trivial" change, it's a fork, ostensibly to retain an open source version of MySQL, but it's diverged enough to make it difficult to support (not that MySQL is any better)


author: Robert Cooper
body: Red Hat announced today at the Red Hat Summit that MariaDB will be replacing MySQL in Red Hat Enterprise Linux 7, due out late 2013. <http://www.bytebot.net/blog/archives/2013/06/12/mariadb-replaces-mysql-in-rhel7>


author: Robert Cooper
body: RHEL 7 is out. No MySQL. MariaDB is the way the major distros are moving. Atlassian needs to move, too, or get lost in the shuffle.


author: Mike Scott
body: Nothing against mariadb, however Cox' comments about MySQL are not correct at all.

MySQL is not crippled, just look at these performance numbers:

[](http://dimitrik.free.fr/blog/archives/2013/11/mysql-performance-over-1m-qps-with-innodb-memcached-plugin-in-mysql-57.html)<http://dimitrik.free.fr/blog/archives/2013/11/mysql-performance-over-1m-qps-with-innodb-memcached-plugin-in-mysql-57.html>

and watch this video from linux.conf.au:

<http://www.mysqlperformanceblog.com/2014/01/22/past-present-future-mysql-variants-linux-conf-au-2014-talk-video/>

Some distros have added mariadb to their repos, that don't mean they have abandon MySQL.


author: Terrence Cox
body: I have to say, you guys need to fix this and now. It just doesn't work with MariaDB 5.5 at all (saying nothing of v10) and Confluence 5.4... ALL major distributions either HAVE or ARE GOING TO IN THE NEXT RELEASE abandon the Oracle crippled MySQL. If you want your product to remain viable in the fast changing landscape, get on it, it has been almost a year that this was reported.

I have checked the link discussion above and it points back here, you won't get any of my or my company's money right now and if it is not resolved in short order, we will move on to other products - and we would rather pay you. Up to you.


author: Marc Towersap
body: I tried Mariadb 10.0 on windows 7 64bit

JIRA 6.2.1 (64-bit).

Mariadb did seem to work (other than I had to use msql jdbc driver, as JIRA was looking at com.mysql.jdbc package while mariadb has org.mariadb.jdbc (jar tvf \<connection jar\> with plain old Jira.

However, I could not make jira-agile work. I think other plugins were working, at least the default ones that JIRA has, but jira-agile just would not run. I could see it was a valid license, I un-installed it, re-installed it, re-indexed, bounced the JIRA admin service, re-ran the granting of permissions in the mariadb for my jirauser account. I could not make it work reliably. I think I got it to spawn a jira-agile project, but not sure. I almost always see **JIRA Agile is currently unavailable. This might be because an upgrade task has failed to run or has not not yet completed.**

log file snippet has

<br />

2015-01-23 11:51:43,828 lexorank-executor-thread-0 ERROR ServiceRunner LEXO_RANK_SCHEDULER_JOB \[[net.java.ao](http://net.java.ao).sql\] Exception executing SQL update \<CREATE TABLE AO_60DB71_VERSION (  
ID BIGINT AUTO_INCREMENT NOT NULL,  
START_DATE BIGINT,  
VERSION_ID BIGINT NOT NULL,  
PRIMARY KEY(ID)  
) ENGINE=InnoDB\>  

java.sql.SQLSyntaxErrorException: Table 'ao_60db71_version' already exists  

at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:138)  

at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)  

. I am moving to my server to use postgres right now...


author: Stefan Cazemier
body: I managed the installation with Confluence 5.4.4 based on

* Synology DS412+
* DSM 5.0
* MariaDB 5.33 installed by Package Center

When configuring the database:

select MySQL External Database, then I put *mysql-connector-java-5.1.29-bin.jar* in directory */opt/atlassian/confluence/confluence/WEB-INF/lib*

restart Confluence, then choose

* Driver Class Name = *com.mysql.jddbc.Driver*
* Database URL = *jdbc:mysql://localhost:3306/confluence?useUnicode=true\&characterEncoding=UTF8\&sessionVariables=storage_engine=InnoDB*
* Use your normal username and password

I made several settings and tests after Confluence has been installed. Everything seems to be stable; no errors in logfiles found so far.

But MariaDB is very slow - at least on my Synology. Any ideas?


author: LuizA
body: Hello Victor,

I would like to add my opinion and point of view here, so as MariaDB is not a supported database, I did not see any customer using this database (even it is a db server developed by some of the original authors of MySQL). Maybe in the future this DB server can be supported, but actually just the databases listed in our supported platforms are recommended for Confluence 5.x, please see below:

<https://confluence.atlassian.com/display/DOC/Supported+Platforms>

But anyway let's hear from the community if somebody already tried this DB (even it is not supported), maybe another person can also comment here, let's see.

I hope this helps.

Kind Regards,

LJ.  

comments: author: Victor Williams
body: Well, as we see more and more Linux distributions dropping MySQL from being packaged with the OS and using MariaDB instead, I think it at least deserves an answer.

The more interesting question I'd like to know is if Atlassian will support MariaDB at some point in the near future with its products. I think MySQL is going to start to be used less, and use of MariaDB is going to increase since it is now going to be packaged with Fedora and Slackware...while not super-popular distros, they do have a solid following. Fedora is just a gateway to Red Hat proper and CentOS.

To me it would be nice to see support for both. I've already migrated several environments from MySQL backend to MariaDB without a single issue, and our Jira and Conflunce environments are the only ones still riding on top of MySQL.

Overall, the less I have to be dependent on anything coming out of Oracle, the happier I am. I realize that Java is a necessary evil.