Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Could not find driver with class name: com.mysql.jdbc.Driver in ubuntu

I have installed Jira as service, while I was trying to set up the database I am getting an error "Could not find driver with class name: com.mysql.jdbc.Driver" please help in this case.

Could not find driver with class name: com.mysql.jdbc.Driver

Server: Ubuntu 18.04.3 (LTS) x64

Database: mysql 5.7

jira version: 8.7

2020-02-07_17-45-51.png

3 answers

1 accepted

1 vote
Answer accepted
Alexis Robert Community Leader Feb 07, 2020

Hi @Vinod Bathi , 

 

this is because the MySQL driver is not bundled with the Jira installation package. You need to download it here : https://dev.mysql.com/downloads/connector/j/5.1.html

And then unzip it and move the jar file in <Jira-installation-directory>/lib

You can find the full procedure here : https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-mysql-5-7-966063305.html

 

Let me know if this helps, 

 

--Alexis

Hi @Alexis Robert ,

After following your answer, my error has been changed, a new error has been thrown.

"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.

hostname: Temporary failure in name resolution"

2020-02-08_00-18-09.png

Alexis Robert Community Leader Feb 07, 2020

Hi @Vinod Bathi , 

 

in "hostname", just put "localhost" (without the quotes) and it should all be good.

Hi @Alexis Robert 

updated as per your instruction, got an error, please find the screenshot, after the error, by following the Connecting Jira applications to MySQL 5.7, i have updated my.cnf , unable to start mysql server2020-02-08_11-04-44.png

Hi @Alexis Robert ,

can you please me in this issue.

 

Regards,

Vinod

Please follow these steps: i had the same problem and this helped:

- Go to https://dev.mysql.com/downloads/connector/j/8.0.html

- Choose "Platform independent"  instead of (Ubuntu, ...)

- Download the ZIP File: Platform Independent (Architecture Independent), Compressed TAR Archive

- Unzip it

- Copy the .JAR file from ~/Downloads/mysql-connector-java-8.0.23/mysql-connector-java-8.0.23.jar to your installation directory (/opt/atlassian/jira/lib)

- make sure the file is there: ll /opt/atlassian/jira/liba | grep mysql

- restart jira: Go to /opt/atlassian/bin and run ./stop-jira.sh then run ./start-jira.sh

shujiYuan I'm New Here Oct 21, 2021

thank u, you save my day.

I've done all this but still receiving the original error:

Could not find driver with class name: com.mysql.jdbc.Driver

The documentation is not crystal clear.

- I d/l the mysql gzip file

- moved the file to /opt/atlassian/jira/lib/

- ran the tar command

- it created a directory: mysql-connector-java-5.1.49

- restarted jira

- same error

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

470 views 19 23
Read article

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