- Create new data in your MySql database say 'userstore'
- CREATE DATABASE userstore;
- Copy your mysql connector jar (ex: mysql-connector-java-5.1.12-bin.jar) to PRODUCT_HOME/repository/components/lib directory.
- Now go to master-datasource.xml file at PRODUCT_HOME/repository/conf/datasources
- Replace the datasource tag with the following,
<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/userstore?autoReconnect=true</url>
<username>root</username>
<password>123</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>
Set your MySql url, username and password accordingly.
Once you start your server with sh ./wso2server.sh -Dsetup all the required scripts will be run and your database base will be updated.
Now you are ready to go :)