mysqljdbcwebspheredatasourcewebsphere-8

MySQL JDBC DataSource for WebSphere 8.5.5


I am trying to setup a JDBC data source for my WebSphere App Server which I can call using JNDI in my application. All the tutorials I went through, mentions that I need to put com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource in the Implementation Class Name. But the MySQL jar (I am using version 8.0.30) does not have the class in the jar file. I placed the JAR in C:\IBM\WebSphere\AppServer\optionalLibraries\IBM\jdbc

I found the class in the old MySQL jars 5.1.XX jars. Should I go ahead with the older jar without worry of compatibility or anything? Or should I change the class name to something the newer JAR provides.

Any help would be greatly appreciated.


Solution

  • It looks like MySQL 5.1 is out of any form of support, so using 8.0+ is a better choice. It looks like you should be using com.mysql.cj.jdbc.MysqlConnectionPoolDataSource

    Here's a list of changes from 5.1 to 8.0:
    https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-api-changes.html