Jira H2, but MySQL configured.

Niclas Bürger April 11, 2019

Hi,
when I first installed Jira, I set up a MySQL database.
I connected to this database during the Browser install progress and was told that everything worked.

 

When i now log in to Jira i get an Error: 

Embedded Database:

What does this check do?

Checks if the instance is connected to an HSQL or H2 database

Result

Jira is using the H2 embedded database. You should migrate to a supported database to ensure your data is safe.

 

Why is that so ? 

I configured MySQL and was told that Jira successfully connectet to it. 

 

Do i need to do aditional stuff ? 

 

Greetings 

 

Niclas

 

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 12, 2019

Hi Niclas,

When setting up Jira to connect to the H2 database would occur if you selected the Set it up for me option during the install as covered here, but as you noted setting up the database connection and seeing the confirmation during the install that does not seem like what occurred here. 

The only other thing I could think of is if you were copying over a jira-home directory from a previous install and over wrote the dbconfig.xml that had a connection to an h2 rather than the MySQL you previously configured.

But double check the dbconfig.xml in your jia-home directory as this will be the source of truth as to where the DB is currently pointing.

If you do not have any data with this being a fresh install I would suggest just reinstalling the instance, following one of these guides:

But if you have data that needs to be migrated off the H2 to the MySQL DB to correct this the best approach is to:

  1. Make sure you DB  Type/version is set up per the Supported Platforms making sure the mentioned driver is installed
  2. Create a new blank database per Connecting JIRA to a database
  3. Gather an XML backup of your JIRA instance. Even if you can't start JIRA, you can still find a recent one of these backups in the filesystem of the JIRA server. By default this is saved in the <jira-home>/export/ folder 
  4. Stop Jira
  5. Run the JIRA Configuration tool to tell JIRA to use the new blank database, save these changes, (if you can't run this, then you can just directly edit the  <jira-home>/dbconfig.xml file to make these changes)
  6. Start JIRA up again (when JIRA starts with an empty database, it automatically launches the setup wizard)
  7. Copy the export XML zip file from  <jira-home>/export folder  to the   <jira-home>/import folder 
  8. Then you can import the backup using the 'Import your data' link in the setup wizard

By following these steps you should be all set with the data imported into a the new MySQL database with the correct database configuration.

Regards,
Earl

Suggest an answer

Log in or Sign up to answer