This is about how to create a MySQL datasource in Websphere Test Environment via WSAD (Websphere Studio Application Developer).
Open the server configuration and select the data source tab. Select then the following parameters
-
Database type: User-defined
- JDBC provider type: User-defined JDBC Provider
Then hit next and in the next screen input the following parameters

- Name: MySQL
- Description: blablabla
- Implementation class name: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
- class path: remove the existing one and use add external jar pointing to the right MySQL jdbc jar file (mysql-connector-java-5.0.5-bin.jar in my case).
After confirming the JDBC provider, select it from the list and select add next the data source box (just below). Use the Version 5.0 data source, and use next to proceed. Input the following data

- Name: <name of the jdbc>
- JNDI Name: jdbc/<name of the jdbc>
- Data source helper class name: com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper
Notice that the helper class is very important. Ensure to use the one specified or things wont works fine.
Now It’s time to input the connection parameters. In the next box (resource properties), after selecting the just created data source, click add until input all those properties:

- databaseName: <yourdatabase>?autoReconnect=true (java.lang.String)
- factory: com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory
- password: <the password>
- port: 3306 (or your port if installation is customized)
- serverName: <your server name>
- user: <the user for connection>
After this, remember to refer to the data source in web.xml and restart the server.