Add JDBC provider in WebSphere

Home > Search

Configuring WebSphere to handle the connection to a database is a multi-step process. First, you add a JDBC driver, such as a MySQL, MariaDB, Oracle, DB2, or SQL Server driver. Next, you create a data source to use the JDBC driver.  Then, you configure the J2C alias (username, password). 

In ths example, the MySQL JDBC driver is downloaded, from This will download a tar archive. Move the tar archive onto your WebSphere server (Linux in this example). Decompress the gzip compress tar archive.

~]# gunzip mysql-<version>.tar.gz


Extract the tar archive.

~]# tar -xf mysql-<version>.tar


Copy the MySQL JAR into a directory where you will be storing your JDBC drivers (/opt/jdbc in this example).

~]# cp mysql-connector-java-version-bin.jar /opt/jdbc


Add the JDBC driver to WebSphere.

  1. In the left panel of the WebSphere web console, expand Resources > JMS.
  2. Select JDBC provider.
  3. Select New.
  4. At Step 1: Create new JDBC provider, select the appropriate database type. In this example, the implemenation classname should be com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource. Select the appropriate database type and select Next.


  1. At Step 2, enter the path to where the JAR is located on the WebSphere server and select Next.


  1. At step 3, select Finish. The JDBC provider should now be displayed. Next, create the data source.

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter in the box below so that we can be sure you are a human.