If you want to manually set up and configure your MySQL
database for Application Center with WebSphere® Application Server,
use the following procedure.
About this task
Complete the MySQL database setup procedure before continuing.
Note: MySQL
in combination with
WebSphere Application Server Liberty profile
or
WebSphere Application Server full
profile is not classified as a supported configuration. For more information,
see
WebSphere Application Server Support
Statement. We suggest that you use IBM® DB2® or
another database supported by
WebSphere Application Server to
benefit from a configuration that is fully supported by IBM Support.
Procedure
- Determine a suitable directory for the JDBC driver JAR
file in the WebSphere Application Server installation
directory.
- For a standalone server, you can use a directory such as WAS_INSTALL_DIR/optionalLibraries/IBM/Worklight/mysql.
- For deployment to a WebSphere Application Server ND
cell, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/Worklight/mysql.
- For deployment to a WebSphere Application Serverr
ND cluster, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/clusters/cluster-name/Worklight/mysql.
- For deployment to a WebSphere Application Server ND
node, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/nodes/node-name/Worklight/mysql.
- For deployment to a WebSphere Application Server ND
server, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/nodes/node-name/servers/server-name/Worklight/mysql.
If this directory does not exist, create it.
- Add the MySQL JDBC driver JAR file downloaded from Download Connector/J to the directory determined
in step 1.
- Set up the JDBC provider:
- In the WebSphere Application Server console,
click .
- Select the appropriate scope from the Scope combination
box.
- Click New.
- Create a JDBC provider named MySQL.
- Set Database type to User
defined.
- Set Scope to Cell.
- Set Implementation class to com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource.
- Set Database classpath to the
JAR file in the directory determined in step 1, replacing WAS_INSTALL_DIR/profiles/profile-name with
the WebSphere Application Server variable
reference ${USER_INSTALL_ROOT}.
- Save your changes.
- Create a data source for the IBM Application
Center database:
- Click .
- Select the appropriate scope from the Scope combination
box.
- Click New to create a data source.
- Type any name (for example, Application Center
Database).
- Set JNDI Name to jdbc/AppCenterDS.
- Use the existing JDBC Provider MySQL,
defined in the previous step.
- Set Scope to New.
- On the Configuration tab, select Non-transactional
data source.
- Click Next a number of times,
leaving all other settings as defaults.
- Save your changes.
- Set the custom properties of the new data source.
- Select the new data source.
- Click Custom properties.
- Set the following properties:
portNumber = 3306
relaxAutoCommit=true
databaseName = APPCNTR
serverName = the host name of the MySQL server
user = the user name of the MySQL server
password = the password associated with the user name
- Set the WebSphere Application Server custom
properties of the new data source.
- In , select the new data source.
- Click WebSphere Application Server data source
properties.
- Select Non-transactional data source.
- Click OK.
- Click Save.