gpt4 book ai didi

mysql - 数据库资源管理器未看到 MySQL J Connect "Unable to find JDBC driver file on MATLAB Java class path"

转载 作者:行者123 更新时间:2023-11-29 03:17:50 26 4
gpt4 key购买 nike

我正在运行 MATLAB R2018a 并尝试使用数据库工具箱将其连接到我的 MySQL 8.0.11 服务器。我正在使用 this page as a guide .

我已经使用 MySQL 安装程序安装了 Connector J 8.0,并将文件添加到类路径(如所述)。运行javaclasspath 给我:

    STATIC JAVA PATH

C:\Program Files\MATLAB\R2018a\java\patch
[.. removed many files]
C:\Program Files\MATLAB\R2018a\java\jar\zh_CN\webintegration_res.jar
C:\Program Files (x86)\MySQL\Connector J 8.0\mysql-connector-java-8.0.11.jar

DYNAMIC JAVA PATH

<empty>

看来是对的。然后我尝试(如描述的 here ):

d = com.mysql.cj.jdbc.Driver;
urlValid = d.acceptsURL('jdbc:mysql://localhost:3306/[*removed*]');
props = java.util.Properties;
props.put('user',[*removed*]); props.put('password',[*removed]*);
con = d.connect('jdbc:mysql://localhost:3306/[*removed*]',props)

它告诉我

Tue Aug 07 10:59:16 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

con =

com.mysql.cj.jdbc.ConnectionImpl@ea27e34

所以一切看起来都很好。并且:

con2 = database('[*removed*]', '[*removed*]', '[*removed*]', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3306/[*removed*]')

也能正常工作。

然而

如果我尝试使用 MATLAB 的(400 美元/年)数据库工具箱连接到数据库,我会收到“无法在 MATLAB Java 类路径上找到 JDBC 驱动程序文件” enter image description here

我是不是做错了什么,或者这是一个错误?有谁知道如何解决这个问题?

根据 this answer版本应该兼容。

最佳答案

嗯,这确实是个错误。

我刚刚注意到“测试”按钮没有变灰,正如您在问题图片中看到的那样。输入我的数据库详细信息并推送后,我可以输入我的用户名和密码,这会返回

Connection successful!

然后保存它,关闭配置面板并使用“新查询”连接到数据库,我现在已成功连接到我的数据库。

关于mysql - 数据库资源管理器未看到 MySQL J Connect "Unable to find JDBC driver file on MATLAB Java class path",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51722966/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com