Running Business Processes and Composite Applications : Administering My webMethods Server : Changing the My webMethods Server Configuration : Configuring My webMethods Server to Use MySQL : Configuring My webMethods Server to Use MySQL Community Edition
Configuring My webMethods Server to Use MySQL Community Edition
To configure My webMethods Server for MySQL Community Edition
1. Download the MySQL native driver (mysql-connector-java-version-bin.jar) from the following location:
https://dev.mysql.com/downloads/connector/j/5.1.html
2. Copy the .jar file to the Software AG_directory \MWS\lib directory.
3. Create a driver-name.bnd text file in the Software AG_directory \MWS\lib directory, where driver-name is the name of the .jar file, for example, mysql-connector-java-version.bnd.
4. Provide instructions for the OSGi bundle conversion in the .bnd text file, as described in the following example.
Replace the values in italics. For Bundle-Version, you can use the version number of the .jar file, but any unique number is valid. You can also use the value (5.1.41) provided in the following example.

# attach as fragment to the caf.server bundle
Fragment-Host: com.webmethods.caf.server
Bundle-SymbolicName: mysql-connector-java-
Bundle-Version: 5.1.41
Include-Resource: mysql-connector-java-5.1.41.jar
-exportcontents: *
Bundle-ClassPath: mysql-connector-java-5.1.41.jar
Import-Package: *;resolution:=optional
5. At a command line prompt, type the following command to move to the server's bin directory.
cd Software AG_directory\MWS\bin
6. Type the following command:
mws.bat -s serverName update-osgi-profile
7. Go to Software AG_directory \MWS\server\default\config and open the mws.db.xml file in a text editor.
Following is a sample mws.db.xml file.

<CONFIG>
<CONNECTION default="true" displayname="Default" id="1" name="default"
type="mysql">
<SQLWORKERCLASS>com.webmethods.portal.service.sql.core.BaseSqlWorker
</SQLWORKERCLASS>
<CONNPROVIDERCLASS>com.webmethods.portal.service.sql.core.provider.pool.
PooledConnectionProvider
</CONNPROVIDERCLASS>
<PARAMS>
<DRIVER>com.mysql.jdbc.Driver</DRIVER>
<URL>jdbc:mysql://localhost:3306/<databasename>?relaxAutoCommit=true
</URL>
<USER><username></USER>
<!-- Password could be specified in clear text,
it will be automatically encrypted during MWS startup-->
<PASSWORD><password></PASSWORD>
<CACHESTATEMENTS>false</CACHESTATEMENTS>
<TESTSQL>SELECT COUNT(*) FROM TBLTHING WHERE IDTHING = 1</TESTSQL>
<MAXCONNECTIONS>100</MAXCONNECTIONS>
<MINCONNECTIONS>0</MINCONNECTIONS>
<!-- Max amount of idle time (in seconds) of the objects pooled
by this pool -->
<IDLETIMEOUT>60</IDLETIMEOUT>
<!-- Time (in seconds) between eviction runs -->
<CLEANUPPERIOD>10</CLEANUPPERIOD>
</PARAMS>
</CONNECTION>
</CONFIG>
8. Specify values for the following tags in the file to access MySQL Community Edition:
a. Type your database name inside the <URL></URL> tags.
<URL>jdbc:mysql://…;DatabaseName=databaseName</URL>
b. Type your user name inside the <USER></USER> tags.
<USER>userName</USER>
c. Type your password inside the <PASSWORD></PASSWORD> tags.
<PASSWORD>password</PASSWORD>
9. Add the following properties to your MySQL configuration file, which is My.ini on Windows and My.cnf on Linux.

sql-mode="PIPES_AS_CONCAT"
sql-mode="ANSI_QUOTES"
10. Save the file and restart your MySQL database server.
11. Start My webMethods Server.
Important:  
Deploying .war files to My webMethods Server might fail after completing the procedure. If such an issue occurs, increase the following parameters in the MySQL configuration file, and then restart the MySQL database server.

innodb_buffer_pool_size = 5G
innodb_log_file_size = 80M
max_allowed_packet = 24M
Copyright © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback