Sonarqube 5.5 and mariadb

2019-06-15 07:22发布

We are trying to upgrade to lastest sonarqube 5.5. We have mariadb 10.1 (latest) and since now we had no problems with sonarqube.

Now, with the upgrade, sonarqube will not boot. It says:

Unsupported mysql version: 5.5. Minimal supported version is 5.6.

Is there any trick we can use to make "sonar think" we are using mysql 5.6?

3条回答
We Are One
2楼-- · 2019-06-15 07:50

You could change the MINIMAL_SUPPORTED_DB_VERSIONS member in the Sonarqube's class https://github.com/SonarSource/sonarqube/blob/master/sonar-db/src/main/java/org/sonar/db/DatabaseChecker.java

  private static final Map<String, Version> MINIMAL_SUPPORTED_DB_VERSIONS = ImmutableMap.of(
    // MsSQL 2008 is 10.x
    // MsSQL 2012 is 11.x
    // MsSQL 2014 is 12.x
    // https://support.microsoft.com/en-us/kb/321185
    MsSql.ID, Version.create(10, 0, 0),
    MySql.ID, Version.create(5, 6, 0),
    Oracle.ID, Version.create(11, 0, 0),
    PostgreSql.ID, Version.create(8, 0, 0)
  );

And build the project again, but If they have that requirement it's possible that after the change not everything is going to work fine.

查看更多
Lonely孤独者°
3楼-- · 2019-06-15 07:58

here is a bsdiff file.

you can Patch it with:

bspatch sonar-db-5.6.jar sonar-db-5.6.jar.new sonar-db-5.6.jar.patch

Replace it and it works!

https://drive.google.com/file/d/0B1EExMdpLmiLR1JmVFQ3ZTVPTlU/view?usp=sharing

查看更多
我只想做你的唯一
4楼-- · 2019-06-15 08:06

MariaDB is not supported by SonarQube - still in v7. Please see this here:

SonarQube Requirements

The Solution to run SonarQube in combination with XAMPP is to change the database from MariaDB to MySQL. Here you'll find the steps for changing it:

https://gist.github.com/odan/c799417460470c3776ffa8adce57eece

查看更多
登录 后发表回答