Forums

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

Cannot connect MySQL database to Jira

catalysm
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!
May 5, 2018

I have a clean Jira install, in the setup wizard when trying to select a custom database,

I always get this error

Error connecting to database

Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near '=InnoDB'.

I figured, this might be some front end input parsing error, so I tried to use the config.sh file. This reported the same error

I found this thread aswell https://community.atlassian.com/t5/Jira-questions/Setting-up-Mysql-DB-giving-a-connection-error/qaq-p/267550

I tried editing the dbconf.xml file, but that didn't feel like the way to go. Got timezone errors there.


Anyway, I know for a fact the database is working and is available. Besides, the error message seems like a query syntax error?

I don't know what to do or try from here

3 answers

1 accepted

4 votes
Answer accepted
Alex Johnson
Contributor
May 7, 2018

Hi there, Found this while looking into some other database issues.
It appears Oracle recently released the 8.0 version of the connector/j

This seems to cause some issues during install and changes some things in the url string.

You can download the 5.1 version from oracle https://dev.mysql.com/downloads/connector/j/5.1.html

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2018

Atlassian's documentation on connecting Jira to MySQL does recommend to use the 5.1.x version of that jdbc driver. 

To copy the MySQL JDBC driver to your application server:

  1. Get the MySQL driver:
    • If you are installing JIRA, download the recommended MySQL driver JDBC Connector/J 5.1. 
      You can download either the .tar.gz or the .zip file by selecting the 'Platform Independent' option. Extract the jar for the driver (e.g. mysql-connector-java-5.x.x-bin.jar) from the archive.

Atlassian has not tested Jira against this newer Connector/J 8.0 yet, I would not expect it to work until the time when Jira begins to support MySQL 8, which has not happened yet.

[Edit: updated link to direct to 5.1]

Like m_kramek likes this
catalysm
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!
May 9, 2018

This fixed the issue! Thanks alot :)

@Andy Heinzer That link takes me to the 8.0 download page, hence the confusion.

Thanks for the help!

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2018

Sorry for the inconvenience Niek, I created a documentation bug ticket to get our technical writing team to update that document to be more explicit https://jira.atlassian.com/browse/JRASERVER-67274

Aleks Buterman
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!
May 9, 2018

That was the answer, thank you!

0 votes
Mat Chavez
Contributor
July 22, 2018

I'll put in my 2c that when you start using -x-x nomenclature, it wasn't clear that v5.1 is correct. This is because you should be doing 5-1-xx rather than 5-x-x. Also, you should go out of your way to say that despite the current version being 8, we're asking you to go all the way back to 5. Cheers.

Nic Brough -Adaptavist-
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.
July 22, 2018

Not sure it's "all the way back", as 8 is the version after 5.  It's asking you to go back one whole release.

0 votes
Aleks Buterman
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!
May 6, 2018

Would like an answer as well.  Reconstituting our Jira environment with newest versions, including Connector/J 8.0 and getting the exact same error.  Everything else appears to work properly.

Suggest an answer

Log in or Sign up to answer