MATLAB Answers

MySQL jdbc server not working with Matlab 2019

45 views (last 30 days)
Hi
I changed from Matlab 2018 to 2019 and suddenly I have problems with the MySQL JDBC-Driver. Although it is installed, Matlab can't find it, and I get the following error message:
JDBC Driver Error: No suitable driver found for jdbc:mysql:
Any idea why this might be the case?
Cheers
Renger

  0 Comments

Sign in to comment.

Accepted Answer

Kojiro Saito
Kojiro Saito on 1 Dec 2019
You need to copy javaclasspath.txt from prefdir of R2018a (orR2018b) to prefdir of R2019a. In javaclasspath.txt, I suppose you had described the location of MySQL JDBC driver path.
Instead of using javaclasspath.txt, we can use configureJDBCDataSource from R2019a and it's easier to preset MySQL JDBC driver path. Here is a link of documenation.

  6 Comments

Show 3 older comments
Renger van Nieuwkoop
Renger van Nieuwkoop on 10 Dec 2019
back again: I am running the same script on our university server using 2018a and have now the default catalogue also defined -> no problem:
conn =
connection with properties:
DataSource: 'nexus'
UserName: 'jared'
Driver: 'com.mysql.jdbc.Driver'
URL: 'jdbc:mysql://itet-psl-s02 ...'
Message: ''
Type: 'JDBC Connection Object'
Database Properties:
AutoCommit: 'on'
ReadOnly: 'off'
LoginTimeout: 0
MaxDatabaseConnections: 0
Catalog and Schema Information:
DefaultCatalog: 'nexus'
Catalogs: {'cge', 'em', 'information_schema' ... and 22 more}
Schemas: {}
Database and Driver Information:
DatabaseProductName: 'MySQL'
DatabaseProductVersion: '8.0.18'
DriverName: 'MySQL Connector/J'
DriverVersion: 'mysql-connector-java-8.0. ...'
Using 2019a-Update 5 makes the connection but the default catalogue in the connection is empty. Is this a bug that has been solved in 2019b (I couldn't find it in the documentation)?
DataSource: 'nexus'
UserName: 'jared'
Driver: 'com.mysql.cj.jdbc.Driver'
URL: 'jdbc:mysql://itet-psl-s02 ...'
Message: ''
Type: 'JDBC Connection Object'
Database Properties:
AutoCommit: 'on'
ReadOnly: 'off'
LoginTimeout: 0
MaxDatabaseConnections: 0
Catalog and Schema Information:
DefaultCatalog: ''
Catalogs: {'cge', 'em', 'information_schema' ... and 22 more}
Schemas: {}
Database and Driver Information:
DatabaseProductName: 'MySQL'
DatabaseProductVersion: '8.0.18'
DriverName: 'MySQL Connector/J'
DriverVersion: 'mysql-connector-java-8.0. ...'
Cheers
Renger
Kojiro Saito
Kojiro Saito on 19 Dec 2019
I've discussed with developers of Database Toolbox and this issue seems to be the same as reported in this URL. So, they think it is fixed in R2019a Update 2 and R2019b. I'm wondering why you have this issue in R2019a Update 5.
Renger van Nieuwkoop
Renger van Nieuwkoop on 19 Dec 2019
Hi Kojiro
The version R2019a Update 5 is running on the university server (Unix/Linux). Might that be an explanation?
Cheers
Renger

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2019a

Translated by