Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

MariaDB instead of MySQL

Victor Williams March 28, 2013

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

8 answers

1 accepted

9 votes
Answer accepted
Bryan Deter June 2, 2013

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.

Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2013

I'm not allowed to vote twice. +1

Matt Petrowsky August 25, 2013

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.

Bryan Deter August 26, 2013

@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.

Devon Jobes October 27, 2014

@Bryan Deter Where do you change the "net.sf.hibernate.dialect" settings?

Robin Niel May 11, 2016

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

ctramnitz January 10, 2018

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2018

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.

ctramnitz January 10, 2018

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2018

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)

2 votes
Robert Cooper June 12, 2013

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

1 vote
Robert Cooper June 16, 2014

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.

1 vote
Mike Scott February 23, 2014

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

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.

1 vote
Terrence Cox January 15, 2014

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.

0 votes
Marc Towersap January 23, 2015

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


2015-01-23 11:51:43,828 lexorank-executor-thread-0 ERROR ServiceRunner    LEXO_RANK_SCHEDULER_JOB [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...

0 votes
Stefan Cazemier March 26, 2014

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?

0 votes
LuizA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2013

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.

Victor Williams March 28, 2013

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events