Score:0

JDBC Driver Error after Ubuntu upgrade from 18.04 to 20.04

cn flag

I recently upgraded the Ubuntu version from 18.04 to 20.04 (using do-release-upgrade) on a machine running MySQL server.

Now I get on the client machine the following error message in programs using the Java database connector:

JDBC Driver Error: Communications link failure

I am pretty sure that the MySQL server is up and running well, for example, I can access it from the same machine as follows:

mysql -u root -p

How can I fix this problem?

Score:1
cn flag

The error message JDBC Driver Error: Communications link failure is not very specific - this could be e.g. due to MySQL server not running at all, or due to a connection not being usable for the client e.g. due to a version mismatch.

In my case, it was a version mismatch between MySQL server (whose version was updated to 8.0.30 following the Ubuntu distribution upgrade to 20.04), and the MySQL connector on the client side.

To fix the problem, unlike the error message states, no changes on the server were needed.

On the client machine, I installed the MySQL connector matching the MySQL server version, according to the guide in this answer.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.