...
Table of Contents |
---|
maxLevel | 64 |
---|
minLevel | 3 |
---|
style | border:1 |
---|
location | top |
---|
separator | pipe |
---|
|
...
The default datasource configuration are defined in the 2 files listed below, which are located in the <PRODUCTEMM_HOME>/repository/conf/datasources
directory. The database configurations in registry.xml
and user-mgt.xml
refer to the WSO2_CARBON_DB
datasource.
Excerpt |
info |
---|
the , WSO2_EMM_DB and WSO2AM_DB datasources in the master-datasources.xml |
and cdm-datasources.xml file by replacing the url , username , password |
and and driverClassName settings with your custom values |
and also the other values accordingly.master-datasources.xml
Panel |
---|
This file contains the following default datasource configurations to configure EMM with the Carbon database and the WSO2 API Manager database.. Expand |
---|
title | WSO2_Carbon_DB datasource |
---|
| Code Block |
---|
| <datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/WSO2CARBON_DB</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource> |
|
Expand |
---|
title | WSO2AM_DB datasource |
---|
| Code Block |
---|
| <datasource>
<name>WSO2AM_DB</name>
<description>The datasource used for API Manager database</description>
<jndiConfig>
<name>jdbc/WSO2AM_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/WSO2AM_DB</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource> |
|
|
cdmemm-datasources.xml
Panel |
---|
This file contains the following default datasource configurations to configure EMM with the Connected Device Management Framework and for mobile device management.Edit the DM_DS , MobileIOSDM_DS , MobileAndroidDM_DS and MobileWindowsDM_DS datasources in the cdm-datasources.xml file by replacing the url , username , password and driverClassName settings with your custom values. Expand |
---|
| Code Block |
---|
| <datasource>
<name>DM_DS</name>
<description>The datasource used for EMM</description>
<jndiConfig>
<name>jdbc/DM_DS</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/WSO2DM_DB</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource> |
|
Expand |
---|
title | MobileIOSDM_DS datasource |
---|
| This datasource is specifically used to manage mobile devices on the iOS platform. Code Block |
---|
| <datasource>
<name>MobileIOSDM_DS</name>
<description>The datasource used for EMM Mobile iOS Device Management</description>
<jndiConfig>
<name>jdbc/MobileIOSDM_DS</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/WSO2MobileIOS_DB</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource> |
|
Expand |
---|
title | MobileAndroidDM_DS datasource |
---|
| This datasource is specifically used to manage mobile devices on the Android platform. Code Block |
---|
| <datasource>
<name>MobileAndroidDM_DS</name>
<description>The datasource used for EMM Mobile Android Device Management</description>
<jndiConfig>
<name>jdbc/MobileAndroidDM_DS</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/WSO2MobileAndroid_DB</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource> |
|
Expand |
---|
title | MobileWindowsDM_DS datasource |
---|
| This datasource is specifically used to manage mobile devices on the Windows platform. Code Block |
---|
| <datasource>
<name>MobileWindowsDM_DS</name>
<description>The datasource used for EMM Mobile Windows Device Management</description>
<jndiConfig>
<name>jdbc/MobileWindowsDM_DS</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/WSO2MobileWindows_DB</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource> |
|
|
|
...
- url - The URL of the database.
username - The name of the database user.
- password - The password of the database user.
- driverClassName - The class name of the database driver.
- maxActive - The maximum number of active connections that can be allocated from this pool at the same time, or enter a negative value for no limit.
- maxWait - The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception. You can enter zero or a negative value to wait indefinitely.
- minIdle - The minimum number of active connections that can remain idle in the pool without extra ones being created, or enter zero to create none.
- testOnBorrow - The indication of whether objects will be validated before being borrowed from the pool. If the object fails to validate, it will be dropped from the pool, and another attempt will be made to borrow another.
- validationQuery - The SQL query that will be used to validate connections from this pool before returning them to the caller.
validationInterval - The indication to avoid excess validation, and only run validation at the most, at this frequency (time in milliseconds). If a connection is due for validation, but has been validated previously within this interval, it will not be validated again.
...
Download the MySQL Java connector JAR file, and copy it to the <PRODUCTEMM_HOME>/repository/components/lib
directory.
...
Database | DB Script name and Location |
---|
WSO2_CARBON_DB | <PRODUCT<EMM_HOME>/dbscripts/mysql.sql |
WSO2AM_DB | <PRODUCT<EMM_HOME>/dbscripts/apimgt/mysql.sql |
WSO2DM_DB
| <EMM_HOME>/dbscripts/cdm/mysql.sql
|
WSO2MobileIOS_DB
| <EMM_HOME>/dbscripts/cdm/plugins/ios/mysql.sql |
WSO2MobileAndroid_DB
| <EMM_HOME>/dbscripts/cdm/plugins/android/mysql.sql |
WSO2MobileWindows_DB
| <EMM_HOME>/dbscripts/cdm/plugins/windows/mysql.sql |
Using the script
You can create database tables manually by executing the following script:
Run the MySQL script individually for the latter mentioned databases that are provided with the product using the below command (outside the MySQL prompt):
Code Block |
---|
mysql -u <USERNAME> -p -D<DATABASE-NAME> '<PATH-TO-MYSQL-DB-SCRIPT>'; |
For example:
Code Block |
---|
mysql -u <USERNAME> -p -Dregdb '<PRODUCT<EMM_HOME>/dbscripts/mysql.sql'; |
Info |
---|
Enter the password for each command when prompted. |
- Start the WSO2 product instance as follows:
...