Create a data source in WebSphere

Home > Search

Before creating a data source, you will need to add a JDBC driver to WebSphere for the database that you want to connect to, such as MySQL, MariaDB, Oracle, DB2, or SQL Server.

Create the data source.

  1. In the left panel of the WebSphere web console, expand Resources > JDBC, and select Data sources.
  2. In the scope drop-down selector, select the scope (node and server or cluster) that the data source will reside on.
  3. Select New.
  4. At Step 1, give the data source a unique name and a unique JNDI name. Ensure your JNDI name begins with jdbc/. Select Next.


  1. If prompted to select a JDBC provider, select the JDBC provider for the database you are connecting to and select Next.


  1. When prompted to enter database specific properties for the data source, just select Next.


  1. When prompted to setup the security aliases, keep all selections at none, and select Next. The security aliases will be configured after the J2C alias (username, password) are configured.


  1. Select Finish. The new data source should now be listed. 


Configure the database name, port, and hostname.

  1. Select your data source.
  2. Select Custom properties.
  3. Select or add databaseName, enter your database name, and select OK.
  4. Select or add serverPort, enter your database port (usually 3306), and select OK.
  5. Select or add serverName, enter your server hostname, and select OK.
  6. If using MySQL, add serverTimezone, enter UTC, and select OK.
  7. Select Save.

Next, create the J2C alias.


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.