how to set up mySQL 8.0 J/ Connector drive in Mathematica?

I have upgraded my MySQL database to 8.0. I downloaded its java connector, and moved mysql-connector-java-8.0.12.jar to :

Set CLASSPATH to make sure it can be found

I went to Mathematica and tried to create a new connector:

 com.mysql.cj.jdbc.Driver


and for the protocol I used:

  jdbc:mysql://


Saved it.

Created a new connection to my database, but when I tried to connect I got Error: JDBC::classnotfound

by the way I did the following:

 conn = OpenSQLConnection[
JDBC["com.mysql.cj.jdbc.Driver", "jdbc:mysql://"],
"Name" -> "MyDatabase", "Username" -> "root",


Now I get the following Error

 JDBC::error: Access denied for user 'root'@'localhost' (using password: YES)


Any help will be most appreciated

• Is there a reason you put the driver in that directory? The times I needed to set up SQL connections, I've always used $UserBaseDirectory/Applications/Oracle/ with success. I put the jar into $UserBaseDirectory/Applications/Oracle/Java and the JDBCDriver configuration .m file into \$UserBaseDirectory/Applications/Oracle/DatabaseResources. – Sjoerd Smit Sep 28 '18 at 11:04
• Looking at that directory, I found out that it already have the jar for version 5 of MySQL, so it made sense to put it there. But I think my problem has to do with changing my CLASSPATH, do you know how I can reset it so I can access mySQL? Now I cannot even access it through MySQLWorkbench – user34018 Sep 28 '18 at 11:43
• Wolfram has it's own class path for java binaries.See reference.wolfram.com/language/JLink/ref/JavaClassPath.html to check how it's set in WL. – Sjoerd Smit Sep 28 '18 at 12:58
• I did this but still not results conn = OpenSQLConnection[ JDBC["com.mysql.cj.jdbc.MysqlDataSource", "jdbc:mysql"], "Name" -> "NewDatabase", "Username" -> "root", "Password" -> "1234"] – user34018 Oct 1 '18 at 1:06
• In that case I don't think I can help you much further, since all I really know is what's in the documentation. Are you sure you didn't overlook anything in the user guide? reference.wolfram.com/language/DatabaseLink/tutorial/… – Sjoerd Smit Oct 1 '18 at 8:37