Wednesday, March 4, 2015

How to access default H2 database in WSO2 products

WSO2 products include a default H2 database which would contain the queries,unless you change it to another like MYSQL etc. Specially when debugging , there are instances you need to check and query results in your database tables. So this is how you can access the default H2 database.  This is an example on how to access H2 database of API manager. You could follow similar steps for other products as well.


1. Go to <APIM HOME>\repository\conf and open carbon.xml.
2. Enable the following configuration in carbon.xml.

  <H2DatabaseConfiguration>
        <property name="web" />
        <property name="webPort">8082</property>
        <property name="webAllowOthers" />
    </H2DatabaseConfiguration>

    3. Restart the server.
    4.Go to http://localhost:8082 and provide given values for the listed fields to access the DB.

    for JDBCURL:    jdbc:h2:repository/database/WSO2AM_DB
    for username :     wso2carbon.
    for password:      wso2carbon.

No comments:

Post a Comment