BitBucket Server says com.mysql.jdbc.Driver is not available even though the jar is there

I've just upgraded our BitBucket Server to 5.2.2 and it won't start with an error message: "The database, as currently configured, is not accessible. Bitbucket is configured to use the mysql driver (com.mysql.jdbc.Driver) but it is not available.".


This is not the first time I was upgrading the BitBucket Server. As it was with the last time I was upgrading it, I've put the latest jdbc driver (mysql-connector-java-5.1.43-bin.jar) in the /opt/atlassian/bitbucket/5.2.2/lib folder. It doesn't matter if I start it with service atlbitbucket start or 5.2.2/bin/ commands, the error is always there.

Is this a known issue and can it be resolved?

2 answers

1 accepted

The lib folder was moved to /var/atlassian/application-data/bitbucket/lib, placing the mysql-connector-java-5.1.43-bin.jar file there solved the issue.

That did it for me! Thanks.

did it also for me after a G search... 

I suggest Atlassian team to update the page Connecting Bitbucket Server to MySQL with a note that informs that from Bitbucket 5.x by default home dir in linux envs has been moved in /var folder.

Had to figure this out for Windows Server 2008 R2 Sp1 - we were getting the same error when trying to launch it in the browser. With a default install of Bitbucket 5.x the path is apparently:

(where you find the other .jar files). Once we copied the connector there, it worked out.

Thanks Spencer, worked perfectly... Updated docs are needed.

Will there any help with this?

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

692 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot