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
Community moderators have prevented the ability to post new answers.
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vinod Bathi ,
in "hostname", just put "localhost" (without the quotes) and it should all be good.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 server
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank u, you save my day.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.