There are a couple of HOWTO docs out there on this, but they're for older versions of WebSphere. Here are my notes on v7. This works pretty much the same on v6.1 as well.
- You'll need the mysql Connector/J, the official JDBC driver. Google for the latest version and unzip it into a location which is accessible by WAS.
- When you create the JDBC provider, specify that it's user defined. The implementation class name is com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource.
- When you create the data source, the helper class name is com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper.
- After you create the data source, configure the following five custom properties: databaseName (like this: dbname?autoReconnect=true), user, password, port (default=3306), and serverName. You can leave the factory properties alone.
- Of course, in mysql you'll need to grant access to this user/password combination!
- After you save the configuration, you can try to access it, but you'll probably get an exception. Just bounce WAS, and presto!