I upgraded mysql to newest version:
127.0.0.1$ mysql -V
mysql Ver 14.14 Distrib 8.0.0-dmr, for Linux (x86_64) using EditLine wrapper
Now I cannot connect with mysql
by jdbc
using driver connector/j
in program mathematica
. When I am trying do this, then I see exception:
JDBC::error: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
In purpose to debug I installed oldest mysql
on virtual machine.
192.168.43.48$ mysql -V
mysql Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.3
And connection with oldest mysql
was done correctly.
You can see commands initializing connections and these results on the screen:
My Mathematica uses the following version of JDBC
and Connector/J
:
I am obtaining these info by execution command (in mathematica
not bash
):
JDBCDrivers["MySQL(Connector/J)"]
that gives output:
JDBCDriver["Name" -> "MySQL(Connector/J)",
"Driver" -> "com.mysql.jdbc.Driver", "Protocol" -> "jdbc:mysql://",
"Version" -> 3.,
"Description" ->
"MySQL using Connector/J - Version 5.1.27 - This supports all known \
MySQL server versions.",
"Location" ->
"/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/DatabaseLink/\
DatabaseResources/mysql.m"]
I append info about java version:
127.0.0.1$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
Should I upgrade jdbc
, connector/j
, or downgrade mysql
? Maybe is there another solution?
Connector/J 5.x will not connect to a MySQL 8.x database; you have to use the 8.0.x Connector/J driver.
Note that with the 8.0.x Connector/J driver the classpath also changed, from com.mysql.jdbc.Driver
to com.mysql.cj.jdbc.Driver
.