Browse the H2 database of WSO2 products

Pathirennehelage Nadeeshani
1 min readDec 27, 2017

--

WSO2 products are default used the H2 database. We would need to browse this database for user management related operations for a particular product.

Here I’m going to explain how to browse this database for the users who are fresh to WSO2 products.

  1. Open the carbon.xml file in the CARBON_HOME/repository/conf folder.
  2. Add the H2DatabaseConfiguration in the file as follows.
<H2DatabaseConfiguration>         
<property name="web"/>
<property name="webPort">8082</property>
<property name="webAllowOthers"/> </H2DatabaseConfiguration>

3. Start the the server.

4. Browse http://localhost:8082.

You will get a window like below.

Enter the JDBC URL to the database that you want to connect.

jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE

username : wso2carbon

password : wso2carbon

These information are in the master-datasources.xml in <PRODUCT_HOME>/repository/conf/datasources folder.

Look the following datasource example.

If you want to connect to another database search for that entry in the master-datasources.xml file and fill the particular information and connect to that database.

Hope this would help you.

Cheers :)

--

--