Forums

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

Error connecting to Database

Jerome Kern
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!
August 22, 2018

Hello,

 

I am trying to install Jira Servicedesk on a server and use MYSQL for the database.   For some reason I can not get past this point.  I have the connector installed in the lib folder for this installation.  MYSQL is already installed on this server as it is the same server that runs JIRA and Confluence.  It is listening to port 3306 as seen below and the user has grants to this database.  Please help!!!

 

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

Database Connection: My Own Database

Database Type: MYSQL

Host 10.36.25.45

Port:  3306

Database:  jirasddb

Username:  jsd

Password:  *********************************************************

 

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| confluence |
| jiradb |
| jirasddb |
| mysql |
| performance_schema |
+--------------------+
6 rows in set (0.02 sec)

mysql> quit
Bye
linux-superman@prodjirasvr01:/opt/atlassian/jirasd/bin$ netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 127.0.0.1:8005 :::* LISTEN
tcp6 0 0 127.0.0.1:8006 :::* LISTEN
tcp6 0 0 :::8008 :::* LISTEN
tcp6 0 0 :::8080 :::* LISTEN
tcp6 0 0 :::8081 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::8090 :::* LISTEN
tcp6 0 0 :::8091 :::* LISTEN
tcp6 0 0 :::8095 :::* LISTEN
tcp6 0 0 127.0.0.1:8000 :::* LISTEN
linux-superman@prodjirasvr01:/opt/atlassian/jirasd/bin$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 73606
Server version: 5.6.33-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql> SHOW GRANTS FOR jsd@10.36.25.45;
+--------------------------------------------------------------------------------------------------------------+
| Grants for jsd@10.36.25.45 |
+--------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'jsd'@'10.36.25.45' IDENTIFIED BY PASSWORD '*55364B8EB67E5DA72951CF193856219E2D36A955' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `JIRADB`.* TO 'jsd'@'10.36.25.45' |
+--------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

1 answer

0 votes
Tzu Hau Chai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2018

Hi Jerome,

I would suggest you to look into the bind address configuration of your MySQL, if it is set to 127.0.0.1, you probably won't be able to connect via 10.36.25.45:3306. Alternatively you can simply use 127.0.0.1:3306 instead, since JIRA and MySQL are on the same host. From your netstat output, it seems like the bind address for your MySQL server is set to 127.0.0.1.

Suggest an answer

Log in or Sign up to answer