Message Boards Message Boards

0
|
1957 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Issue in OpenSQLConnect[Connector/J]?

Posted 2 years ago

Struggling with OpenSQLConnect[Connector/J] in Mathematica version 13.0. The code is:

OpenSQLConnection[
 JDBC["MySQL(Connector/J)", "ip and name of remote database"], 
 "Version" -> 3.1, "Catalog" -> Automatic, "Description" -> None, 
 "autoReconnect" -> True, "Password" -> xxx", 
 "Properties" -> {}, "ReadOnly" -> Automatic, "RelativePath" -> False,
  "TransactionIsolationLevel" -> Automatic, 
 "UseConnectionPool" -> Automatic, "Username" -> "xxx", 
 "Timeout" -> 1000]

Getting:

*JDBC::error: Communications link failure The last packet successfully received from the server was 515 milliseconds ago. The last packet sent successfully to the server was 484 milliseconds ago.*

Curious thing:

Executing the same code, at the same time, on the same machine in version 12.3 is working well.

Conclusion: it is a bug in 13.0.

Command JDBCDrivers["MySQL(Connector/J)"] gives

JDBCDriver["Name" -> "MySQL(Connector/J)", 
 "Driver" -> "com.mysql.jdbc.Driver", 
 "Protocol" -> {"jdbc:mysql://", "jdbc:mysql:loadbalance://"}, 
 "Version" -> 3.1`, 
 "Description" -> "MySQL using Connector/J - Version 5.1.44", 
 "Location" -> 
  "C:\\Program Files\\Wolfram \
Research\\Mathematica\\12.3\\SystemFiles\\Links\\DatabaseLink\\\
DatabaseResources\\mysql.m"]

the same as in version 13.0 (except the location)

JDBCDriver["Name" -> "MySQL(Connector/J)", 
 "Driver" -> "com.mysql.jdbc.Driver", 
 "Protocol" -> {"jdbc:mysql://", "jdbc:mysql:loadbalance://"}, 
 "Version" -> 3.1, 
 "Description" -> "MySQL using Connector/J - Version 5.1.44", 
 "Location" -> 
  "C:\\Program Files\\Wolfram \
Research\\Mathematica\\13.0\\SystemFiles\\Links\\DatabaseLink\\\
DatabaseResources\\mysql.m"]

The mysql.m packages are identical in both installations. Verified on another computer, same behavior: v12.3 works, v13.0 doesn't. (nor in v13.0.1)

Did anybody encounter this? Maybe a solution?

Thanks, Laszlo

POSTED BY: Laszlo Abraham
Posted 2 years ago

Wolfram support suggested this workaround. See Properties->

OpenSQLConnection[
 JDBC["MySQL(Connector/J)", "ip and name of remote database"], 
 "Version" -> 3.1, "Catalog" -> Automatic, "Description" -> None, 
 "autoReconnect" -> True, "Password" -> xxx", 
 "Properties" -> {"useSSL" -> "False"}, "ReadOnly" -> Automatic, "RelativePath" -> False,
  "TransactionIsolationLevel" -> Automatic, 
 "UseConnectionPool" -> Automatic, "Username" -> "xxx", 
 "Timeout" -> 1000]

It works! The developers will implement the useSSL->True in the next version.

POSTED BY: Laszlo Abraham
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract