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.
- Add the MySQL JDBC driver JAR file to $LIBERTY_HOME/usr/shared/resources/lib. If that directory does not exist, create it.
- Configure the data source in the $LIBERTY_HOME/usr/servers/worklightServer/server.xml file as follows:
<server description="new server"> <!-- Enable features --> <featureManager> <feature>servlet-3.0</feature> <feature>jdbc-4.0</feature> </featureManager> <httpEndpoint id="defaultHttpEndpoint" host="localhost" httpPort="8080"> </httpEndpoint> <classloader delegation="parentLast"> <commonLibrary> <fileset dir="${shared.resource.dir}/lib" includes="*.jar"/> </commonLibrary> </classloader> </application> <!-- JNDI data source --> <dataSource id="mySQL" jndiName="jdbc/WorklightDS" jdbcDriverRef="MySQLJDBCDriver"> <properties databaseName="WRKLGHT" password="worklight" portNumber="3306" serverName="localhost" user="worklight"/> </dataSource> <dataSource id="mySQL" jndiName="jdbc/WorklightReportsDS" jdbcDriverRef="MySQLJDBCDriver"> <properties databaseName="WLREPORT" password="worklight" portNumber="3306" serverName="localhost" user="worklight"/> </dataSource> <library id="lib"> <fileset dir="${shared.resource.dir}/lib" includes=" mysql-connector-java-5.1.18-bin.jar"/> </library> <jdbcDriver id=" MySQLJDBCDriver " libraryRef="lib"></jdbcDriver> </server>
Parent topic Troubleshooting