2
$\begingroup$

I got a new Mac at work, fresh install of Mathematica v13.3 (old 2015 Mac is dying and has v11.3).
Problem: In v13.3 I cannot connect to older mySQL databases, using v13's JDBC driver (org.mariadb.jdbc.Driver); however, in v11.3 on my old Mac there is com.mysql.jdbc.Driver which works fine.
The error I get is
    Client does not support authentication protocol requested by server. plugin type was = ''
which appears to be related to the database's outdated security protocol. (Various articles/knowledgebase confirm that this error can be corrected by using the proper older version.)

I have also tried to use a single mysql.m with the driver file that should be compatible with the old database (mysql-connector-java-3.0.10-stable-bin.jar) and also tried with mysql-connector-java-5.1.38-bin.jar as well as with the current standard mySQL driver mysql-connector-j-8.1.0.jar. These are the stable versions from Oracle which correspond to different eras, with either 3.0.10 or 5.1.38 corresponding to the drivers which old Mathematica (v10, v11) that had connected ok with my old databases.
In all these cases, I still get the same error.
I have additionally tried to use AddToClassPath with the Prepend -> True option, but still get the same authentication protocol error.

So it would be helpful to know:

  1. What JDBC mySQL driver was shipped with v11.3, or how could I directly copy/replicate its installation in v13.3?
  2. How does one associate a particular .m file with a particular .jar driver in Mathematica? I know which respective directories to put these into (e.g., DatabaseResources and Java respectively under ~/Library/Mathematica/Applications/Oracle/), and need to make a mysql.m file for them, but how do I ensure that a given mysql.m in the DatabaseResources subdirectory points to the proper mysql-connector-java.XX.jar in the Java subdirectory?

The documentation and online Mathematica groups do not give this info, and I have gone back and forth with Wolfram support for weeks, whom just finally advised to "just install the old version", without answering the above 2 questions!

I have looked at threads 265499 and 275191 here as well as the links from them to solutions of similar problems (e.g. 20365), but none gave appropriate/applicable help.

Could somebody out there help me? [I am unable to continue with some work without solving this problem.]

$\endgroup$

1 Answer 1

0
$\begingroup$

To add a JDBC driver to class path, see: Add new JDBC Driver to connect Mathematica to SQL database

I don't understand what you mean by associating .m and .jar files. If the class name in your JDBC[] call is correct it will call the right driver. If you are concerned the driver you install is called the same thing as the built-in one, you can check the order via JavaClassPath[].

I don't know what driver was shipped with 11.3, but the old classname sounds like Connector/J, which is still available. It's hard to say if the version you'd need is available without knowing what version of MySQL you are trying to connect to.

$\endgroup$
1
  • $\begingroup$ thanks @oscu0, but it appears that you missed relevant details; you pasted a link I mentioned. The driver in v11.3 works with our old (v4.1.22) SQL server, but the Connector/J in v13 doesn't. mysql-connector-java-3.0.10-stable-bin.jar should work (matches v4.1.22 server), but doesn't in v13. If one needs multiple drivers (for different MySQLs), then doesn't one have multiple .m definition files? I need to find what .jar driver file came with v11.3, because it's the only thing that works. The only solution Wolfram support offered was to install both v11.3 and v13 on my new laptop. $\endgroup$
    – Mark_in_DK
    Nov 25, 2023 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.