Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Not able to get mysql work with Jira

Hi Experts,
I am in the process of install JIRA and integrating mysql with it. I have installed mysql and have configured a user and a database for it that will be used by Jira for communicating with it. I have also installed the mysql-connector-java-5.1.31.tar.gz driver under :-

tar -xvf /home/srjiv/Downloads/mysql-connector-java-5.1.31.tar.gz

cd mysql-connector-java-5.1.31

cp mysql-connector-java-5.1.31-bin.jar /opt/atlassian/jira/lib/

But somehow I am not able to connect and get the below error message
Error connecting to database
Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Connection refused
Please let me know if I am missing something here.
Appreciate all your help in advance.

1 answer

0 votes

Connection refused usually means you've not given Jira the right connection details, and/or you haven't granted the Jira user the right to use the database you've created for it.

Hi Srijiv, the message "Communications link failure" makes me think that there may be an issue with the access to the database. Are JIRA and MySQL installed on the same server or different servers? You may test the connection with the Telnet command (telnet mysql_server_name 3306)

Additionally, you may check if you're able to connect to this database using another software as dbvisualizer to check whether the connection is working.

I hope it helps.


Hi Nic and Tiago , appreciate your quick response, thankyou very much.

Nic , to answer your question, I am absolutely new to mysql. I tried to give user -jiradbuser complete permission for database mysql, but it is throwing an error with incorrect syntax.

Tiago, yes Jira and mysql are running on the same server. When I try to telnet to the mysql server, it is not able to connect

C:\Users\Srijiv>telnet 3306

Connecting To not open connection to the host, on port 3306

: Connect failed

But if I try to make a connection to the same server on port 8080 (Jira Default Port), it is able to connect.
C:\Users\Srijiv>telnet 8080
Connection open
Under /etc/mysql/my.cfg, I have configured the password, port as 3306 for mysql, so I should be able to connect.
Guys, please help me with the mysql commands to give user-jiradbuser complete permission to access the database-mysql.
Appreciate all your help

Definitely the database settings then.

Telnet to the database server on port 3306 failing really does mean it's not listening at all, so it's no surprise that you can't get Jira to connect.

The usual trick for debugging mysql is to use the mysql client to attempt to debug it, if you have that installed as well. However, in this case, mysql simply isn't listening yet, so it's more fundamental than the connection settings.

How are you running mysql server on the box? Are you sure it's running and are you sure it's configured for port 3306?

(As an aside, connecting to 8080 is actually proving that Jira is running there, which I think we already know, it's nothing to do with mysql yet)

Hi Srijiv, you can use the follow command to grant the database access:

flush privileges;

As for the telnet command, it may be that Windows firewall is blocking the connection. You may want to disable it temporarily to check whether it's the case.


No, that implies that it's not listening on 3306, despite your config file.

I'm not sure how to debug that - I'd start with a look in /var/log/mysql (and check the settings file to see if the logs are elsewhere)

Hi Nic and Tiago , I think so that the mysql is running and with the settings I posted.


password = cisco.123

port = 3306

socket = /var/run/mysqld/mysqld.sock

Gauss ~ # /etc/init.d/mysql restart

* Stopping mysql ... [ ok ]

* Starting mysql ... [ ok ]

However when I do :-

Gauss ~ # netstat -a | grep 3306

Gauss ~ #

I dont see the port 3306 in listening state.
Is this normal ?

This is what I see under /var/log/mysqld.conf

140717 8:25:49 InnoDB: Started; log sequence number 0 44233

140717 8:25:49 [Note] Event Scheduler: Loaded 0 events

140717 8:25:49 [Note] /usr/sbin/mysqld: ready for connections.

Version: '5.1.70-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-5.1.70

140717 9:14:29 [Note] /usr/sbin/mysqld: Normal shutdown

140717 9:14:29 [Note] Event Scheduler: Purging the queue. 0 events

140717 9:14:29 InnoDB: Starting shutdown...

140717 9:14:32 InnoDB: Shutdown completed; log sequence number 0 44233

140717 9:14:32 [Note] /usr/sbin/mysqld: Shutdown complete

140717 9:14:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.

140717 9:14:32 InnoDB: Initializing buffer pool, size = 16.0M

140717 9:14:32 InnoDB: Completed initialization of buffer pool

140717 9:14:32 InnoDB: Started; log sequence number 0 44233

140717 9:14:32 [Note] Event Scheduler: Loaded 0 events

140717 9:14:32 [Note] /usr/sbin/mysqld: ready for connections.

Version: '5.1.70-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-5.1.70

Rest of the files like /var/log/mysql/mysql.log and /var/log/mysql/mysqld.err are empty.
Does this info provides any clue as to why this is happening

I now get a screen which asks me to choose wheather I would like to go with Jira or Jira with Agile or Jira with Service Support. Does this means that the mysql is now integrated with Jira ? How could I check that ? It is no longer asking me to enter the mysql information like the database name or the database user . Is this normal ?

That means it's connected now. I can't see what you've changed to make it work from what you've posted.

I dint changed any thing. Just stopped and restarted the services for Jira, and when I tried logging into the server, it took me directly to the bove options. I dout that mysql is integarated into Jira.

Something that was not working started working. You must have changed something at some point.

Jira will not function without a database behind it. You have either selected a different database type (the hsql one is built in and requires no configuration, but shouldn't be used for anything other than dev/test) or you've made MySQL work. You can check on the system-information page.

Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you