+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Configure WebSphere Application Server for MySQL manually for Application Center

If we want to manually set up and configure your MySQL database for Application Center with WebSphere® Application Server, use the following procedure.

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 we use IBM® DB2® or another database supported by WebSphere Application Server to benefit from a configuration that is fully supported by IBM Support.


Procedure

  1. Determine a suitable directory for the JDBC driver JAR file in the WebSphere Application Server installation directory.

    • For a standalone server, we 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.

  2. Add the MySQL JDBC driver JAR file downloaded from Download Connector/J to the directory determined in step 1.
  3. Set up the JDBC provider:

    1. In the WebSphere Application Server console, click Resources > JDBC > JDBC Providers.
    2. Select the appropriate scope from the Scope combination box.
    3. Click New.
    4. Create a JDBC provider named MySQL.
    5. Set Database type to User defined.
    6. Set Scope to Cell.
    7. Set Implementation class to com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource.
    8. 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}.
    9. Save your changes.
  4. Create a data source for the IBM Application Center database:

    1. Click Resources > JDBC > Data sources.
    2. Select the appropriate scope from the Scope combination box.
    3. Click New to create a data source.
    4. Type any name (for example, Application Center Database).
    5. Set JNDI Name to jdbc/AppCenterDS.
    6. Use the existing JDBC Provider MySQL, defined in the previous step.
    7. Set Scope to New.
    8. On the Configuration tab, select Non-transactional data source.
    9. Click Next a number of times, leaving all other settings as defaults.
    10. Save your changes.
  5. Set the custom properties of the new data source.

    1. Select the new data source.
    2. Click Custom properties.
    3. 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

  6. Set the WebSphere Application Server custom properties of the new data source.

    1. In Resources > JDBC > Data sources, select the new data source.
    2. Click WebSphere Application Server data source properties.
    3. Select Non-transactional data source.
    4. Click OK.
    5. Click Save.

Parent topic: Configure the MySQL database manually for Application Center