Configuring Liberty Profile for MySQL manually

IBM Worklight V5.0.5. automatically configures your databases. However, if you are using an older version of IBM Worklight, or if you are experiencing problems with the automatic configuration process for Liberty Profile on MySQL, you must manually set up and configure your MySQL database and then the Liberty Profile for MySQL. Complete the MySQL database setup procedure before continuing.

  1. Add the MySQL JDBC driver JAR file to $LIBERTY_HOME/usr/shared/resources/lib. If that directory does not exist, create it.

  2. Configure the data source in the $LIBERTY_HOME/usr/servers/worklightServer/server.xml file as follows:
    <server description="new server">
        <!-- Enable features -->
        <httpEndpoint id="defaultHttpEndpoint"
        <classloader delegation="parentLast">
                    <fileset dir="${shared.resource.dir}/lib" includes="*.jar"/>
        <!-- JNDI data source -->
        <dataSource id="mySQL"  jndiName="jdbc/WorklightDS" jdbcDriverRef="MySQLJDBCDriver">
            <properties databaseName="WRKLGHT" password="worklight" portNumber="3306" serverName="localhost" user="worklight"/>
        <dataSource id="mySQL"  jndiName="jdbc/WorklightReportsDS" jdbcDriverRef="MySQLJDBCDriver">
            <properties databaseName="WLREPORT" password="worklight" portNumber="3306" serverName="localhost" user="worklight"/>
        <library id="lib">
            <fileset dir="${shared.resource.dir}/lib" includes=" mysql-connector-java-5.1.18-bin.jar"/>
        <jdbcDriver id=" MySQLJDBCDriver " libraryRef="lib"></jdbcDriver>

Parent topic Troubleshooting