Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Connect to the database and run the above scripts. For example, shown below is how to create data in a MySQL database.

    Code Block
    languagepowershell
    mysql -u root -p -DBPS_DS < '<EI_HOME>/wso2/business-process/dbscripts/bps/bpel/create/mysql.sql';
  2. Restart the server.
Info

You can create database tables automatically when starting the product for the first time by using the -Dsetup parameter as follows:

  • For Windows: <EI_HOME>/wso2/business-process/bin/wso2server.bat -Dsetup

  • For Linux: <EI_HOME>/wso2/business-process/bin/wso2server.sh -Dsetup

Creating database tables in the BPMN database 

...

  1. Connect to the database and run the above scripts. For example, execute the following scripts to create data in a MySQL database.

    • activiti.mysql.create.engine.sql

    • activiti.mysql.create.history.sql

    • activiti.mysql.create.identity.sql
    • activiti.mysql.create.substitute.sql

    Shown below is how the script for creating identity data is executed:

    Code Block
    languagepowershell
    mysql -u root -p -DBPS_DS < '<EI_HOME>/wso2/business-process/dbscripts/bps/bpmn/create/activiti.mysql.create.identity.sql';
  2. Restart the server.

...

Create database tables when the server starts

You can create database tables automatically when starting the product for the first time by using the -Dsetup parameter as follows:

  • For Windows: <EI_HOME>/wso2/business-process/bin/wso2server.bat -Dsetup

  • For Linux: <EI_HOME>/wso2/business-process/bin/wso2server.sh -Dsetup

Excerpt
hiddentrue

Note to writers: Add this content at the end of the page if any of the additional databases is relevant to your product.

Changing the identity/storage/product-specific databases

>The topics above show how to change the WSO2_CARBON_DB, which is used to store registry and user manager information. If you changed the product-specific database that comes by default or set up a separate database for identity or storage related data, the instructions are the same. In summary:

  1. For the identity databaseAdd it to the <PRODUCT_HOME>/repository/conf/datasources/<check the correct path and add file name (something like master-datasources.xml)>
    For the storage databaseAdd it to the <PRODUCT_HOME>/repository/conf/datasources/<check the correct path and add file name (something like master-datasources.xml)
    For the product-specific databaseAdd it to the <PRODUCT_HOME>/repository/conf/<check the correct path and add file name (something like api-manager.xml)
  2. Create the database tables using the following scripts:

    For the identity databaseUse <PRODUCT_HOME>/dbscripts/identity/<check the correct path and add file name (something like mysql.sql)>
    For the storage databaseUse  <PRODUCT_HOME>/dbscripts/storage/<check the correct path and add file name (something like /mysql/resoucre.sql)>
    For the product-specific databaseUse  <PRODUCT_HOME>/dbscripts/<check the correct path and add file name (something like /apimgt/mysql.sql)> 
  3. Update the following configurations, with the defined datasource name of the corresponding database configuration you added to the <PRODUCT_HOME>/repository/conf/datasources/master-datasources.xml file.

    • If you are setting up a separate database to store identity related data, update the following configurations in the <PRODUCT_HOME>/repository/conf/identity.xml file.

      Code Block
      languagexml
      <JDBCPersistenceManager>
      	<DataSource>
      		<!-- Include a data source name (jndiConfigName) from the set of datasources defined in master-datasources.xml -->
      		<Name>jdbc/WSO2CarbonDB</Name>
      	</DataSource>
      </JDBCPersistenceManager>

      Note to writers: For step 3, add content on the XML files which include references on any of the additional databases and require edits that are relevant to your product similar to the given example.