Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Connect to MySQL database

Ashton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2020

Our MySQL version was inadvertently upgraded from 5.7 to 8. This caused our Jira server to crash. We attempted to restart the server prior to realizing the error with the MySQL version.

Once the issue was identified, MySQL 8 was removed and 5.7 was reinstalled. MySQL 5.7 would initially not start. So, the directory with jira database was copied and the original wiped out.  At that point, MySQL started, and the jira database was copied back to its original location.

Currently, Jira will not start. The config file finally was wiped in an attempt to reconnect to the database, but the connection keeps getting refused. We see the log in MySQL noting this.

How do you recover when you accidentally install MySQL 8.0? Is the database corrupted beyond repair? I'm hoping someone has an easy fix for this.

 

Thanks,

Ashton

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2020

Hi Ashton,

Sorry to hear about these database problems.  That sounds frustrating.  Jira server does not yet support MySQL 8 as you likely have found out the hard way.  We have a list of the supported platforms I would check out for references.

What I would recommend would be as follows:

  1. In MySQL 5.7, follow the steps in Connecting Jira applications to MySQL 5.7 to create a new blank empty database.
  2. You can then edit the $JIRAHOME/dbconfig.xml manually, or I prefer using the Jira Config tool to tell your Jira install to use this new empty database when starting up
  3. Go into the $JIRAHOME/export/ folder.  Jira automatically creates backups of your database and stores them in an XML format that is inside a .zip file. 
  4. Copy a recent one of those files into the $JIRAHOME/import/ folder
  5. Start Jira once more

When Jira starts up connected to an empty database, it automatically launches the setup wizard.  In this wizard there is an option to 'import existing data', you can click that and then reference the .zip file from step #4.  This will import your database backup into that new empty database.

Try these steps and let me know if you run into any problems with these.

Andy

Ashton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Andy,

 

Thank you! This solved my problem.

However, once the database was repopulated, I am getting a notification from Jira that my support is about to expire. We renewed the service for another year shortly before this whole issue started last month. I'm concerned that maybe some configuration data was lost when I had to reinstall. Any thoughts?

 

Thank you,

Ashton

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2020

Hi Ashton,

Glad to hear that helped.  What likely happened is that the backup file has your old license key applied.  You might need to update that license key within Jira.  Steps to do this are in Licensing your Jira applications.

In order to see the license key itself, you will need to have the billing or technical contact for that license sign into https://my.atlassian.com and get the license key from there.

Cheers,

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events