Creating MySQL datasource on Websphere Application Server


1.      Create the J2C Authentication alias with MySQL username and password

2.      Creating JDBC provider,
a.      choose the following values

Database type                   : user-defined
Implementation class name :  com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource


b.      In next step provide MySQL JDBC driver jar file ( While installing the MySQL community server , make sure to install java connector (connector J))


c.       Click finish



3.      Once JDBC provider is created , you can create the new datasource under that JDBC provider
a.      Enter datasource name


b.      Enter data store helper class name
Data store helper class name :: com.ibm.websphere.rsadapter.GenericDataStoreHelper


c.       Select the container-managed authentication alias and choose the J2C authentication alias that’s created at starting.


d.      Once Datasource created, need to adjust the following custom properties
Update the following five custom properties


databaseName :test
user                  :root
password         :Passw0rd
port                  :3306
serverName      :sivapc.sivavaka.com







4 comments:

  1. hello sir
    i have install WAS 7 on SUSE VM machine and MySql in Windows is it possible to establish the connection to database..


    plz ANS

    ReplyDelete
  2. U must configure one more custom property i.e "url", if i'm not wrong

    ReplyDelete
    Replies
    1. databaseName :test
      user :root
      password :Passw0rd
      port :3306
      serverName :sivapc.sivavaka.com

      Don't remember configuring URL but as we provide above custom properties to DS and it is enough to connect to DB (basically these are things we provide in url)

      Delete
  3. This post is really helpful to me.Thanks a lot.

    ReplyDelete