Not able to connect the DB with JIRA Edited

HI Team,

I could like to know the solution for the below problem, Thanks In Advance :). What should I have to do for this problem , is it was the problem with "mysql-connector-java-5.1.17.jar" version or some other problem with MYSQL version installed.

I am migrating the JIRA 7.0 from one lunix Server to another lunix server with JIRA 7.3 version.

In Jira 7.0 :
I am using the inbuild DB (H2 Db)

But in the new lunix server : I have installed the JIRA 7.3 versio.

Problem : When I am migrating the data from the backup (backup taken as per the atlassian instruction) to the new JIRA 7.3 version , The heath check for the DB fails.
reason was its supports only MYSQL or some other DB only.

So I have installed the MYSQL in my lunix server and connected the mysql from my workbench. Created the DB as mentioned in the migrating the DB instruction in atlassian.

Instruction flowed :

Note : I have added the details in the my.cnf file and also moved the "mysql-connector-java-5.1.17.jar" file to "/atlassian/jira/lib".

I have deleted the DB config file from atlassian as said in the instruction.

After doing all this and when try to connect the DB to JIRA In the configuration page ,I am getting flowing error.

Error in UI:
Error connecting to database

Unexpected exception encountered during query.


Error of catalina.out:

2018-01-09 17:54:46,544 http-nio-8080-exec-14 ERROR anonymous 1074x6x1 56ier5 <IP Address> /secure/SetupDatabase!connectionCheck.jspa [c.a.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database:
java.sql.SQLException: Unexpected exception encountered during query.
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.ConnectionImpl.execSQL(
at com.mysql.jdbc.StatementImpl.executeUpdate(
at com.mysql.jdbc.StatementImpl.executeUpdate(
at com.mysql.jdbc.ConnectionImpl.setSessionVariables(
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(
at com.mysql.jdbc.ConnectionImpl.createNewIO(
at com.mysql.jdbc.ConnectionImpl.<init>(
at com.mysql.jdbc.JDBC4Connection.<init>(
... 3 filtered
at java.lang.reflect.Constructor.newInstance(
at com.mysql.jdbc.Util.handleNewInstance(
at com.mysql.jdbc.ConnectionImpl.getInstance(
at com.mysql.jdbc.NonRegisteringDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.getTestDatabaseConnection(
at com.atlassian.jira.config.database.JdbcDatasource.getConnection(
at com.atlassian.jira.config.database.DatabaseConfig.testConnection(
at com.atlassian.jira.web.action.setup.SetupDatabase.testConnection(
at com.atlassian.jira.web.action.setup.SetupDatabase.doValidation(
at com.atlassian.jira.web.action.setup.SetupDatabase.doConnectionCheck(
... 3 filtered
at java.lang.reflect.Method.invoke(
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(
at webwork.util.InjectionUtils.invoke(
... 2 filtered
at com.atlassian.jira.action.JiraActionSupport.execute(
... 7 filtered
at javax.servlet.http.HttpServlet.service(
... 49 filtered
... 1 filtered
... 28 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(
... 27 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(
... 28 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
at org.apache.tomcat.util.threads.TaskThread$
Caused by: java.lang.NullPointerException
at com.mysql.jdbc.ConnectionImpl.getServerCharacterEncoding(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.ConnectionImpl.execSQL(
... 181 more


This the Mysql Version I am Using :

| Variable_name | Value |
| innodb_version | 5.6.38 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.38 |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |


This is my my.cnf deatils :

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

# Disabling symbolic-links is recommended to prevent assorted security risks

# Recommended in standard MySQL setup
bind-address =
innodb_data_file_path = ibdata1:10M:autoextend



2 answers

1 accepted

0 votes
Accepted answer

Hi All, 


I have resolved the above mentioned issue.

The root cause of this issue is the "Connector Jar"  "mysql-connector-java-5.1.17.jar" which I have placed in the "Atlassian/jira/lib" path. 


Solution : 

I have resolved the issue by placing the "mysql-connector-java-5.1.35-bin.jar" in the "Atlassian/jira/lib" path. 


After placing the correct Jar and I have restarted the Atlassian. 

After restarting I can able to connect to my Database (Empty Database) and rest of the configuration as mentioned in the Atlassian instruction.

One cool thing is that after you successfully configured , you can see the empty DB with the newly created tables which is  been created by the Atlassian.




Glad you've found a solution. Could you accept your above answer to mark this topic as answered for other users to benefit from your resolution?

Thanks for sharing :)

ya Sure Caritte. You can mark this question has answered. 

Thanks for your Help :)

0 votes
Micky CARITTE Community Champion Jan 09, 2018


As described here:

The usual procedure is to take an XML backup of you H2 instance with your JIRA_HOMe and attachment directories, then install a fresh new Jira (if you're upgrading) connected to a blank MySQL database (should work pretty straight forward if you're using the right JAR and config as you seem to do. Then you should get a new but working Jira, ready to welcome you backup in system import.

Hope the above documentation will help, instead of just removing dbconfig file you might want to reinstall entirely Jira as you're not keeping the same product version.


HI Micky Caritte,


Thanks for your help :). 

As you have mentioned in your link , I have flowed all the steps. While I am trying to connect the empty DB to the Jira while select "I'll set it myself" option. That is the place were I am getting the Problem. The error log which I have got from the catalina.out file of Atlassian and UI error Pop up message also I have included in the previous post.

Can you able to find out any details from the log what could be the problem. 


Advance thanks for your help :) .




Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,234 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you