Versions Compared

Key

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

...

4. This document is based on server installations on a single machine. Following are the port numbers used for the component servers:

 

API Manager ComponentOffset ValuePort Value
WSO2 ELB09443
Key Manager Server19444
Manager Gateway Server29445
Publisher Server39446
Store Server49447
Worker Gateway Server59448

 

Configuring Shared Databases
Anchor
SharedDatabases
SharedDatabases

...

Code Block
mysql> create database prod_regdb;
mysql> use prod_regdb;
mysql> source mysql.sql;

3. Create a new user and grant access to the database as follows.

Code Block
mysql> grant all on reg_db.* TO user@localhost identified by "password";

 

  • user : The username for the user who needs access to the database
  • password : The password for the user who needs access the database

4. To define a datasource for the registry, update <APIM _HOME>/repository/conf/datasources/master-datasources.xml file in the API Publisher and Store server instances to connect to the database created above.

Code Block
languagehtml/xml
<datasource>
   <name>WSO2_REG_DB</name>
   <description>The datasource used for the registry</description>
   <jndiConfig>
      <name>jdbc/WSO2_RegDB</name>
   </jndiConfig>
   <definition type="RDBMS">
      <configuration>
         <url>jdbc:mysql://192.168.139.1:3306/prod_regdb?autoReconnect=true&amp;relaxAutoCommit=true</url>
         <username>peter<<username>user</username>
         <password>password</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 registry mySQL database
  • username : The username to access the mySQL database
  • password : The password to access the mySQL database 
  • jdbc/WSO2_RegDB : The same name used for the datasource in the INSTALL_HOME/repository/conf/api-manager.xml file for all the components

45. Define the registry database in <APIM _HOME>/repository/conf/registry.xml file of the Publisher and Store server instances. The following configuration mounts the governance space to the remote registry instance. 

...

  • remoteInstance url : the URL of the Publisher/Store server node
  • datasource             : The name of the datasource provided for the registry database in the master-datasources.xml file
  • username               : The username to access the mySQL database    

56. Start the server with the following command:

...