Why is MATLAB unable to find the JDBC Driver?
22 次查看(过去 30 天)
显示 更早的评论
Attempts, from MATLAB, to connect to a database fail.
conn = database(dbsource,username,password,'Vendor','MySQL', 'Server','mysql8.db4free.net','portnumber',3306)
Error message: *Unable to find JDBC driver*
[![enter image description here][1]][1]
The [JDBC driver][2] was:
- copied from [https://dev.mysql.com/downloads/file/?id=477058][3]
- copied to C:\drivers\mysql-connector-java-8.0.11\mysql-connector-java-8.0.11.jar
- added to the JDBC static path
- path \ filename was verified:
[![enter image description here][4]][4]
QUESTIONS ====
1) Is there enough information here to diagnose the root cause of the error message?
2) What is the root cause and corrective action?
3) Why does MATLAB indicate the JDBC driver file is not on the java classpath? Remedy?
Responses to requests for additional diagnostic information will be added to the original posting.
UPDATE === Attempt to configure MATLAB's database explorer app returned the message:
JDBC driver file was not found on MATLAB java classpath
[![enter image description here][5]][5]
Java version:
[![enter image description here][6]][6]
[1]:
[2]:
[3]:
[4]:
[5]:
[6]:
1 个评论
Walter Roberson
2018-7-24
You show the JAVA dynamic path as being empty. I do not see where you are adding C:\drivers\mysql-connector-java-8.0.11\mysql-connector-java-8.0.11.jar to your MATLAB classpath ?
采纳的回答
更多回答(1 个)
Pieume Ulrich
2019-5-1
Hello guys I'm using the R2017b and i consulted the version of my JRE and saw that it was 'Java 1.8.0_121-b13'. with this advance i am eligable for the 'mysql-connector-java-8.0.11.jar' driver but yet I still have the same response 'JDBC driver is not found on MATLAB java class path'.
Please I would like to have the complete procedure to connect my MATLAB to mysql using 'JDBC' driver please,
ùy email: pieumeulrich@gmail.com
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!