If you want to manually set up and configure your MySQL
database for Application Center with WebSphere® Application Server Liberty profile,
use the following procedure.
Before you begin
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. You can use IBM® DB2® or
another database supported by
WebSphere Application Server to
benefit from a configuration that is fully supported by IBM Support.
Procedure
- Add the MySQL JDBC driver JAR file
to $LIBERTY_HOME/wlp/usr/shared/resources/mysql.
If that directory does not exist, create it.
- Configure the data source in the $LIBERTY_HOME/usr/servers/worklightServer/server.xml file
(worklightServer may be replaced in this path by
the name of your server) as follows:
<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="MySQLLib">
<fileset dir="${shared.resource.dir}/mysql" includes="*.jar"/>
</library>
<!-- Declare the IBM Application Center database. -->
<dataSource jndiName="jdbc/AppCenterDS" transactional="false">
<jdbcDriver libraryRef="MySQLLib"/>
<properties databaseName="APPCNTR"
serverName="mysqlserver" portNumber="3306"
user="worklight" password="worklight"/>
</dataSource>
where worklight after user= is
the user name, worklight after password= is
this user's password, and mysqlserver is the
host name of your MySQL server (for example, localhost, if it is on
the same machine).
- You can encrypt the database password with the securityUtility
program in <liberty_install_dir>/bin.