Configuring BWAgent for MySQL and TIBCO Enterprise Message Service
The BWAgent can be configured to use MySQL database with TIBCO Enterprise Message Service (EMS) for persistence and transport.
Note: The database name must be unique per agent network if multiple networks share the same physical database. BWAgent and BWEngine supports sharing the same database, users, and schemas.
Before you begin
- Install the latest TIBCO Enterprise Messaging Server and start the server.
- Download the latest MySQL server package
from
their official website and install MySQL. Configure the server configuration by following the prompts in the MySQL Server Configuration wizard. Ensure that you select the following values:
- Database: Multifunctional
- Type of connectivity: Manual
- Default port: 3306
- Download the latest connector JAR files for MySQL to the
BW_HOME\config\drivers\shells\jdbc.mysql.runtime\runtime\plugins\com.tibco.bw.jdbc.datasourcefactory.mysql\libfolder. - Install the MySQL driver by running the command
bwinstall mysql-driverfrom the/binfolder. - Ensure you have installed EMS client libraries. For more information, see the "Integrating with TIBCO Enterprise Message Service™" section in the TIBCO ActiveMatrix BusinessWorks™ Installation guide for additional details.
- Optional. If you are upgrading to ActiveMatrix BusinessWorks 6.3.2, or later versions of the software, upgrade the database schema. For more information, see the "Updating the Database Schema to Enable BWAgent to Use Database with TIBCO Enterprise Message Service" section in the TIBCO ActiveMatrix BusinessWorks™ Installation guide.
- Procedure
- Create a database
bwadmindb and grant privileges to the default database owner
root as described in the following steps:
- Run the following command on the MySQL terminal:
For MySQL 5.x
mysql>create database bwadmindb;
For MySQL 8.xCREATE SCHEMA `bwadmindb` DEFAULT CHARACTER SET utf8;
- Run the following command to view the tables included in the newly created database:
mysql>use bwadmindb;
- Run the following command to grant all privileges to the root user for that database after replacing the value for the host IP address:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@<host_IP> IDENTIFIED BY 'Tibco123'WITH GRANT OPTION;To grant the minimum number of permissions to the bwuser for that database, run the following command, where <host_IP> is replaced with the value for the host IP address:grant create,select,update,insert,delete ON *.* to 'bwuser'@<host_IP> IDENTIFIED BY 'bwuser';
- Run the following command on the MySQL terminal:
- Stop the BWAgent if it is running.
- Open the bwagent_db.json file in BW_HOME\config (Windows) or ${BW_HOME}/config (Unix).
- Update the following properties for your environment:
Property Name MySQL Value dbtypemysql dbdrivercom.mysql.jdbc.Driver dbconnectionurljdbc:mysql://localhost:3306/bwadmindb?useSSL=false dbuserbwuser dbpasswordbwuser - Run the BWAdmin
config command with the
-cf option to create an
.ini file in the correct location.
BW_HOME\bin>bwadmin config -cf ../config/bwagent_db.json agent - Restart the BWAgent.