All docs This doc

Versions Compared


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


  1. Create a database for the shared user and permission store as follows:

    Code Block
    mysql> create database workflow_ustoreuserstore;
    Query OK, 1 row affected (0.00 sec)

    Make sure you copy the database driver (in this case, mysql driver) to the /repository/components/lib folder before starting each server.

  2. Run the <APIM_HOME>/dbscripts/mysql.sql script (the script may vary depending on your database type) on the database to create the required tables.


    From WSO2 Carbon Kernel 4.4.6 onwards there are two MySQL DB scripts available in the product distribution. Click here to identify as to which version of the MySQL script to use.

  3. Open the <APIM_HOME>/repository/conf/datasources/master-datasources.xml and create a datasource pointing to the newly created database. For example,

    Code Block
        <description>The datasource used for API Manager database</description>
        <definition type="RDBMS">
                <validationQuery>SELECT 1</validationQuery>
  4. Repeat step 3 in the BPS as well.
  5. Point the datasource name in <APIM_HOME>/repository/conf/user-mgt.xml to the new datasource. (note that the user store is configured using the <UserStoreManager> element).


    If you already have a user store such as the lDAP in your environment, you can point to it from the user-mgt.xml file, instead of the user store that we created in step1.

    In the following example, the same JDBC user store (that is shared by both the API Manager and the BPS) is used as the permission store as well:

    Code Block
        <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
        <Property name="dataSource">jdbc/ustore</Property>
  6. Repeat step 5 in the BPS as well.