Upgrading to Sonarqube 6.7.2 to 8.1

SonarQube Details:
Current Version of SonarQube: 6.7.2.37468
Machine Details: AWS ec2. 2vCPU, 4 GB Ram.
DB: mysql

Background

  • I’ve been using this sonarqube for more than 2 years now and have a licence for 1M loc (Code base is hardly 175kloc). I had never updated to 7.x and above since it required Postgres or Oracle DB and I wanted it on mysql for some reason. Now, that my licence is about to get over and I read that, support for 6.x will be over soon. So, I need to upgrade to 7.9.2 LTS or 8.1. I prefer 8.1 since it supports Gitlab pipelines and merge request comments.

Problem:

  1. DB migration: How easy it is to migrate data from Mysql to Postgres?
  2. Which DB is desired? Postgres or Oracle? and Why?
  3. What is the DB requirement? (I’ve licence for 1M but code base is hardly 175kloc)
  4. What is the right way of upgrading? (I’m sure upgrading from 6.7.2 to 8.1 will not work. I will have to upgrade several times.)
  5. Last but not the least: Does 8.1 supports Mysql db? In documents, it says so.
    Ref: https://docs.sonarqube.org/latest/requirements/requirements/

Hello @Vighnesh_Pai

Straightforward with the help of mysql-migrator

That’s purely your choice. We do run internally on Postgres but our testing chain is exhaustive for Oracle and SQLServer as well.

I don’t get the question. There is no link between the DB and the license allowance. Generally speaking, requirements are on the doc.

Your guess is good. Check out the Upgrade guide, there’s everything you need. I suggest to proceed accordingly: 6.7.2 > 6.7.7 > 7.9.2 > 8.1

Where do you see a mention of MySQL in this page? MySQL is no longer supported, since 7.9 if I remember correctly.

I hope this helps.

Antoine

2 Likes

Where do you see a mention of MySQL in this page? MySQL is no longer supported, since 7.9 if I remember correctly.

If you go to the Database section of the doc Prerequisites and overview it is mentioned.

Hi @Vighnesh_Pai,

The link you’ve sent is the correct one to check the DB requirements, and you’ll see that we recommend Oracle, Postgres or MSSQL. There is no mention of MySQL, above 7.9 LTS + version of SQ.
Indeed, we deprecated MySQL Support in 7.8 and dropped it in 7.9, as mentioned here: End of Life of MySQL Support

Carine

2 Likes

Thank for clarification!
In hurry I misread MSSQL :see_no_evil:

Hey I needed one more help on if there are any scripts that is provided by or guide on how to migrate from mysql to Postgres? I’m having a hard time with it.

Hi,

My colleague Antoine already sent you the link to the migration tool:

  • DB migration: How easy it is to migrate data from Mysql to Postgres?
    Straightforward with the help of mysql-migrator

If you have any issues using that tool, please open a new topic on the forum (and I would recommend to check on the forum if the issue hasn’t already been raised by other users doing that migration).

Thanks,
Carine

1 Like

I wonder how u deal with guys like me :see_no_evil:
Having a rough day!

Anyways, Thanks for the help.

3 Likes

I don’t get the question. There is no link between the DB and the license allowance. Generally speaking, requirements are on the doc

In the docs, it says Postgres 10, 9.3-9.6. My RDS Postgres is 11.5 will it not work?

Well, we can’t really say. When the docs says that we support it, it’s because we made tests on it. We didn’t on Postgres 11.x. So you can try, but at your own risk.

PostgreSQL 11 and 12 will be officially supported with the next release of SonarQube 8.2. See https://jira.sonarsource.com/browse/SONAR-12865

2 Likes