Unable to Connect to MySQL when Missing a Forward Slash in the Driver URL

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

JIRA doesn't start after an attempt to establish a database connection. Log files contain:

1 2 3 4 5 6 7 8 9 10 11 12 Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql:/localhost/jiraplay?autoReconnect=true&useUnicode=true&characterEncoding=UTF8' java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:264) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at org.ofbiz.core.entity.transaction.JNDIFactory.getJndiConnection(JNDIFactory.java:168) at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:140) at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:99) at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:53) at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:237) at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:318)

Cause

The connect string below in server.xml (jira.xml for EAR/WAR version) is incorrect.

1 jdbc:mysql:/localhost/jiraplay?useUnicode=true&characterEncoding=UTF8

It should be:

1 jdbc:mysql://localhost/jiraplay?useUnicode=true&characterEncoding=UTF8

Note the second "/" before "localhost".

Resolution

Correct the URL string in server.xml (jira.xml for EAR/WAR version) to have two forward slashes (/) before the server id.

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.