I recently updated the Ubuntu OS and now I cannot get the Java programs to connect to the MySQL database. The following error occurs:
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/PTAX?useSSL=falseI searched the web and the only thing I found was to install libmysql-java. However, when I try to install it, the message below occurs.
Unable to locate package libmysql-java 0 2 Answers
Had found this 'answer', then did some more digging about and found a post on Reddit saying this package was merged in to libmariabd-java:
I found the solution. The
libmysql-javahas been (I think merged) withlibmariadb-java. So, I just installed it usingsudo apt install libmariadb-javaAfter that just repeated the same steps as I would do with 18.04 and it worked! No problems whatsoever.
I think the package is now called mysql-connector-java and can be downloaded from This article might also be helpful: Edited to add this suggestion: If you add the mysql repos to ubuntu or debian (howto on mysql website) then the command: sudo apt install mysql-connector-java pulls the file from those repos.