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.
In the WebSphere admin console, expand Resources > JDBC, and select Data sources. In the scope drop-down selector, select the scope (node and server or cluster) that the data source will reside on. If you are not familiar with scopes, check out our scopes article. Select New. At Step 1, give the data source a unique name and a unique JNDI name, such as "jdbc/mySQL" or "jdbc/DB2" or "jdbc/Oracle". Select Next.
It is usually best to have already created the JDBC Provider so that you can choose "Select an existing JDBC provider" and then select your JDBC provider.
At step 3, in this example, the data source is usng the generic helper class com.ibm.websphere.rsadapter.GenericDataSourceHelper. Each helper class contains error codes for fatal exceptions. In this way, each helper class knows about different fatal errors. Typically, you'll use GenericDataSourceHelper.
Select Finish. The new data source should now be listed.
Configure the database name, port, and hostname.