Login fail in management console with admin user after try to integrate user store in wso2-is and wso2-am
<p>I tried to change user store to MySQl and integrate that in Wso2-IS and Wso2-AM(api manager) base on this manual: <a href="https://docs.wso2.com/display/IS500/Configuring+a+JDBC+User+Store" rel="nofollow" title="Configuring a JDBC User Store">here</a>.</p>

<p>After all steps in the mentioned manual, I tried login Wso2-AM Management Console with default admin user,but I got error below:</p>

<blockquote>
  <p>"Login failed! Please recheck the username and password and try again"</p>
</blockquote>

<p>while I login into WSO2-IS Management Console without any problem!
I added new user in WSO2-IS Management Console and login into WSO2-IS without any problem!</p>

<p>Also I have same problem on integration two Wso2-IS user store!</p>

<p>What my problem is?</p>

<p><strong>System Setup:</strong>
wso2-AM 1.10.0
wso2-IS 5.1.0
Configs:</p>

<blockquote>
  <p>wso2-AM user-mgt.xml</p>
</blockquote>

<pre><code>&lt;UserManager&gt;
&lt;Realm&gt;
    &lt;Configuration&gt;
    &lt;AddAdmin&gt;true&lt;/AddAdmin&gt;
        &lt;AdminRole&gt;admin&lt;/AdminRole&gt;
        &lt;AdminUser&gt;
            &lt;UserName&gt;admin&lt;/UserName&gt;
            &lt;Password&gt;admin&lt;/Password&gt;
        &lt;/AdminUser&gt;
        &lt;EveryOneRoleName&gt;everyone&lt;/EveryOneRoleName&gt; &lt;!-- By default users in this role sees the registry root --&gt;
        &lt;Property name="isCascadeDeleteEnabled"&gt;true&lt;/Property&gt;
        &lt;Property name="dataSource"&gt;jdbc/JDBC_demo_user_store&lt;/Property&gt;
        &lt;!--Property name="dataSource"&gt;jdbc/WSO2CarbonDB&lt;/Property--&gt;
        &lt;Property name="MultiTenantRealmConfigBuilder"&gt;org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder&lt;/Property&gt;
    &lt;/Configuration&gt;

    &lt;UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager"&gt;
          &lt;Property name="TenantManager"&gt;org.wso2.carbon.user.core.tenant.JDBCTenantManager&lt;/Property&gt;
          &lt;Property name="driverName"&gt;com.mysql.jdbc.Driver&lt;/Property&gt;
          &lt;Property name="url"&gt;jdbc:mysql://192.168.60.60:3306/JDBC_demo_user_store&lt;/Property&gt;
          &lt;Property name="userName"&gt;root&lt;/Property&gt;
          &lt;Property name="password"&gt;hamsa&lt;/Property&gt;
          &lt;Property name="Disabled"&gt;false&lt;/Property&gt;
          &lt;Property name="MaxUserNameListLength"&gt;100&lt;/Property&gt;
          &lt;Property name="MaxRoleNameListLength"&gt;100&lt;/Property&gt;
          &lt;Property name="UserRolesCacheEnabled"&gt;true&lt;/Property&gt;
          &lt;Property name="PasswordDigest"&gt;SHA-256&lt;/Property&gt;
          &lt;Property name="ReadGroups"&gt;true&lt;/Property&gt;
          &lt;Property name="ReadOnly"&gt;false&lt;/Property&gt;
          &lt;Property name="IsEmailUserName"&gt;false&lt;/Property&gt;
          &lt;Property name="DomainCalculation"&gt;default&lt;/Property&gt;
          &lt;Property name="StoreSaltedPassword"&gt;true&lt;/Property&gt;
          &lt;Property name="WriteGroups"&gt;true&lt;/Property&gt;
          &lt;Property name="UserNameUniqueAcrossTenants"&gt;false&lt;/Property&gt;
          &lt;Property name="PasswordJavaRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="PasswordJavaScriptRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="UsernameJavaRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="UsernameJavaScriptRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="RolenameJavaRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="RolenameJavaScriptRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="SCIMEnabled"&gt;true&lt;/Property&gt;
          &lt;Property name="SelectUserSQL"&gt;SELECT * FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetRoleListSQL"&gt;SELECT UM_ROLE_NAME, UM_TENANT_ID, UM_SHARED_ROLE FROM UM_ROLE WHERE UM_ROLE_NAME LIKE ? AND UM_TENANT_ID=? AND UM_SHARED_ROLE ='0' ORDER BY UM_ROLE_NAME&lt;/Property&gt;
          &lt;Property name="GetSharedRoleListSQL"&gt;SELECT UM_ROLE_NAME, UM_TENANT_ID, UM_SHARED_ROLE FROM UM_ROLE WHERE UM_ROLE_NAME LIKE ? AND UM_SHARED_ROLE ='1' ORDER BY UM_ROLE_NAME&lt;/Property&gt;
          &lt;Property name="UserFilterSQL"&gt;SELECT UM_USER_NAME FROM UM_USER WHERE UM_USER_NAME LIKE ? AND UM_TENANT_ID=? ORDER BY UM_USER_NAME&lt;/Property&gt;
          &lt;Property name="UserRoleSQL"&gt;SELECT UM_ROLE_NAME FROM UM_USER_ROLE, UM_ROLE, UM_USER WHERE UM_USER.UM_USER_NAME=? AND UM_USER.UM_ID=UM_USER_ROLE.UM_USER_ID AND UM_ROLE.UM_ID=UM_USER_ROLE.UM_ROLE_ID AND UM_USER_ROLE.UM_TENANT_ID=? AND UM_ROLE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="UserSharedRoleSQL"&gt;SELECT UM_ROLE_NAME, UM_ROLE.UM_TENANT_ID, UM_SHARED_ROLE FROM UM_SHARED_USER_ROLE INNER JOIN UM_USER ON UM_SHARED_USER_ROLE.UM_USER_ID = UM_USER.UM_ID INNER JOIN UM_ROLE ON UM_SHARED_USER_ROLE.UM_ROLE_ID = UM_ROLE.UM_ID WHERE UM_USER.UM_USER_NAME = ? AND UM_SHARED_USER_ROLE.UM_USER_TENANT_ID = UM_USER.UM_TENANT_ID AND UM_SHARED_USER_ROLE.UM_ROLE_TENANT_ID = UM_ROLE.UM_TENANT_ID AND UM_SHARED_USER_ROLE.UM_USER_TENANT_ID = ?&lt;/Property&gt;
          &lt;Property name="IsRoleExistingSQL"&gt;SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserListOfRoleSQL"&gt;SELECT UM_USER_NAME FROM UM_USER_ROLE, UM_ROLE, UM_USER WHERE UM_ROLE.UM_ROLE_NAME=? AND UM_USER.UM_ID=UM_USER_ROLE.UM_USER_ID AND UM_ROLE.UM_ID=UM_USER_ROLE.UM_ROLE_ID AND UM_USER_ROLE.UM_TENANT_ID=? AND UM_ROLE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserListOfSharedRoleSQL"&gt;SELECT UM_USER_NAME FROM UM_SHARED_USER_ROLE INNER JOIN UM_USER ON UM_SHARED_USER_ROLE.UM_USER_ID = UM_USER.UM_ID INNER JOIN UM_ROLE ON UM_SHARED_USER_ROLE.UM_ROLE_ID = UM_ROLE.UM_ID WHERE UM_ROLE.UM_ROLE_NAME= ? AND UM_SHARED_USER_ROLE.UM_USER_TENANT_ID = UM_USER.UM_TENANT_ID AND UM_SHARED_USER_ROLE.UM_ROLE_TENANT_ID = UM_ROLE.UM_TENANT_ID&lt;/Property&gt;
          &lt;Property name="IsUserExistingSQL"&gt;SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserPropertiesForProfileSQL"&gt;SELECT UM_ATTR_NAME, UM_ATTR_VALUE FROM UM_USER_ATTRIBUTE, UM_USER WHERE UM_USER.UM_ID = UM_USER_ATTRIBUTE.UM_USER_ID AND UM_USER.UM_USER_NAME=? AND UM_PROFILE_ID=? AND UM_USER_ATTRIBUTE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserPropertyForProfileSQL"&gt;SELECT UM_ATTR_VALUE FROM UM_USER_ATTRIBUTE, UM_USER WHERE UM_USER.UM_ID = UM_USER_ATTRIBUTE.UM_USER_ID AND UM_USER.UM_USER_NAME=? AND UM_ATTR_NAME=? AND UM_PROFILE_ID=? AND UM_USER_ATTRIBUTE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserLisForPropertySQL"&gt;SELECT UM_USER_NAME FROM UM_USER, UM_USER_ATTRIBUTE WHERE UM_USER_ATTRIBUTE.UM_USER_ID = UM_USER.UM_ID AND UM_USER_ATTRIBUTE.UM_ATTR_NAME =? AND UM_USER_ATTRIBUTE.UM_ATTR_VALUE LIKE ? AND UM_USER_ATTRIBUTE.UM_PROFILE_ID=? AND UM_USER_ATTRIBUTE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetProfileNamesSQL"&gt;SELECT DISTINCT UM_PROFILE_ID FROM UM_USER_ATTRIBUTE WHERE UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserProfileNamesSQL"&gt;SELECT DISTINCT UM_PROFILE_ID FROM UM_USER_ATTRIBUTE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserIDFromUserNameSQL"&gt;SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetUserNameFromTenantIDSQL"&gt;SELECT UM_USER_NAME FROM UM_USER WHERE UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="GetTenantIDFromUserNameSQL"&gt;SELECT UM_TENANT_ID FROM UM_USER WHERE UM_USER_NAME=?&lt;/Property&gt;
          &lt;Property name="AddUserSQL"&gt;INSERT INTO UM_USER (UM_USER_NAME, UM_USER_PASSWORD, UM_SALT_VALUE, UM_REQUIRE_CHANGE, UM_CHANGED_TIME, UM_TENANT_ID) VALUES (?, ?, ?, ?, ?, ?)&lt;/Property&gt;
          &lt;Property name="AddUserToRoleSQL"&gt;INSERT INTO UM_USER_ROLE (UM_USER_ID, UM_ROLE_ID, UM_TENANT_ID) VALUES ((SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?),(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?), ?)&lt;/Property&gt;
          &lt;Property name="AddRoleSQL"&gt;INSERT INTO UM_ROLE (UM_ROLE_NAME, UM_TENANT_ID) VALUES (?, ?)&lt;/Property&gt;
          &lt;Property name="AddSharedRoleSQL"&gt;UPDATE UM_ROLE SET UM_SHARED_ROLE = ? WHERE UM_ROLE_NAME = ? AND UM_TENANT_ID = ?&lt;/Property&gt;
          &lt;Property name="AddRoleToUserSQL"&gt;INSERT INTO UM_USER_ROLE (UM_ROLE_ID, UM_USER_ID, UM_TENANT_ID) VALUES ((SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?),(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?), ?)&lt;/Property&gt;
          &lt;Property name="AddSharedRoleToUserSQL"&gt;INSERT INTO UM_SHARED_USER_ROLE (UM_ROLE_ID, UM_USER_ID, UM_USER_TENANT_ID, UM_ROLE_TENANT_ID) VALUES ((SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?),(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?), ?, ?)&lt;/Property&gt;
          &lt;Property name="RemoveUserFromSharedRoleSQL"&gt;DELETE FROM UM_SHARED_USER_ROLE WHERE   UM_ROLE_ID=(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?) AND UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_USER_TENANT_ID=? AND UM_ROLE_TENANT_ID = ?&lt;/Property&gt;
          &lt;Property name="RemoveUserFromRoleSQL"&gt;DELETE FROM UM_USER_ROLE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_ROLE_ID=(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="RemoveRoleFromUserSQL"&gt;DELETE FROM UM_USER_ROLE WHERE UM_ROLE_ID=(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?) AND UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="DeleteRoleSQL"&gt;DELETE FROM UM_ROLE WHERE UM_ROLE_NAME = ? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="OnDeleteRoleRemoveUserRoleMappingSQL"&gt;DELETE FROM UM_USER_ROLE WHERE UM_ROLE_ID=(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="DeleteUserSQL"&gt;DELETE FROM UM_USER WHERE UM_USER_NAME = ? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="OnDeleteUserRemoveUserRoleMappingSQL"&gt;DELETE FROM UM_USER_ROLE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="OnDeleteUserRemoveUserAttributeSQL"&gt;DELETE FROM UM_USER_ATTRIBUTE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="UpdateUserPasswordSQL"&gt;UPDATE UM_USER SET UM_USER_PASSWORD= ?, UM_SALT_VALUE=?, UM_REQUIRE_CHANGE=?, UM_CHANGED_TIME=? WHERE UM_USER_NAME= ? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="UpdateRoleNameSQL"&gt;UPDATE UM_ROLE set UM_ROLE_NAME=? WHERE UM_ROLE_NAME = ? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="AddUserPropertySQL"&gt;INSERT INTO UM_USER_ATTRIBUTE (UM_USER_ID, UM_ATTR_NAME, UM_ATTR_VALUE, UM_PROFILE_ID, UM_TENANT_ID) VALUES ((SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?), ?, ?, ?, ?)&lt;/Property&gt;
          &lt;Property name="UpdateUserPropertySQL"&gt;UPDATE UM_USER_ATTRIBUTE SET UM_ATTR_VALUE=? WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_ATTR_NAME=? AND UM_PROFILE_ID=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="DeleteUserPropertySQL"&gt;DELETE FROM UM_USER_ATTRIBUTE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_ATTR_NAME=? AND UM_PROFILE_ID=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="UserNameUniqueAcrossTenantsSQL"&gt;SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=?&lt;/Property&gt;
          &lt;Property name="IsDomainExistingSQL"&gt;SELECT UM_DOMAIN_ID FROM UM_DOMAIN WHERE UM_DOMAIN_NAME=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="AddDomainSQL"&gt;INSERT INTO UM_DOMAIN (UM_DOMAIN_NAME, UM_TENANT_ID) VALUES (?, ?)&lt;/Property&gt;
          &lt;Property name="AddUserToRoleSQL-mssql"&gt;INSERT INTO UM_USER_ROLE (UM_USER_ID, UM_ROLE_ID, UM_TENANT_ID) SELECT (SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?),(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?),(?)&lt;/Property&gt;
          &lt;Property name="AddRoleToUserSQL-mssql"&gt;INSERT INTO UM_USER_ROLE (UM_ROLE_ID, UM_USER_ID, UM_TENANT_ID) SELECT (SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?),(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?), (?)&lt;/Property&gt;
          &lt;Property name="AddUserPropertySQL-mssql"&gt;INSERT INTO UM_USER_ATTRIBUTE (UM_USER_ID, UM_ATTR_NAME, UM_ATTR_VALUE, UM_PROFILE_ID, UM_TENANT_ID) SELECT (SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?), (?), (?), (?), (?)&lt;/Property&gt;
          &lt;Property name="AddUserToRoleSQL-openedge"&gt;INSERT INTO UM_USER_ROLE (UM_USER_ID, UM_ROLE_ID, UM_TENANT_ID) SELECT UU.UM_ID, UR.UM_ID, ? FROM UM_USER UU, UM_ROLE UR WHERE UU.UM_USER_NAME=? AND UU.UM_TENANT_ID=? AND UR.UM_ROLE_NAME=? AND UR.UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="AddRoleToUserSQL-openedge"&gt;INSERT INTO UM_USER_ROLE (UM_ROLE_ID, UM_USER_ID, UM_TENANT_ID) SELECT UR.UM_ID, UU.UM_ID, ? FROM UM_ROLE UR, UM_USER UU WHERE UR.UM_ROLE_NAME=? AND UR.UM_TENANT_ID=? AND UU.UM_USER_NAME=? AND UU.UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="AddUserPropertySQL-openedge"&gt;INSERT INTO UM_USER_ATTRIBUTE (UM_USER_ID, UM_ATTR_NAME, UM_ATTR_VALUE, UM_PROFILE_ID, UM_TENANT_ID) SELECT UM_ID, ?, ?, ?, ? FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?&lt;/Property&gt;
          &lt;Property name="DomainName"&gt;wso2.org&lt;/Property&gt;
          &lt;Property name="Description"/&gt;
    &lt;/UserStoreManager&gt; 

    &lt;AuthorizationManager class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager"&gt;
        &lt;Property name="AdminRoleManagementPermissions"&gt;/permission&lt;/Property&gt;
        &lt;Property name="AuthorizationCacheEnabled"&gt;true&lt;/Property&gt;
        &lt;Property name="GetAllRolesOfUserEnabled"&gt;false&lt;/Property&gt;
    &lt;/AuthorizationManager&gt;
&lt;/Realm&gt;
</code></pre>

<p></p>

<blockquote>
  <p>wso2-AM master-datasources.xml</p>
</blockquote>

<pre><code>&lt;datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration"&gt;

&lt;providers&gt;
    &lt;provider&gt;org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader&lt;/provider&gt;
&lt;/providers&gt;

&lt;datasources&gt;

    &lt;datasource&gt;
        &lt;name&gt;WSO2_CARBON_DB&lt;/name&gt;
        &lt;description&gt;The datasource used for registry and user manager&lt;/description&gt;
        ...
    &lt;/datasource&gt;
    &lt;datasource&gt;
        &lt;name&gt;WSO2AM_DB&lt;/name&gt;
        &lt;description&gt;The datasource used for API Manager database&lt;/description&gt;
        ...
    &lt;/datasource&gt;

     &lt;!--datasource&gt;
        &lt;name&gt;WSO2AM_STATS_DB&lt;/name&gt;
        ...
    &lt;/datasource--&gt;

    &lt;datasource&gt;
        &lt;name&gt;JAGH2&lt;/name&gt;
        &lt;description&gt;The datasource used for by the Jaggery Storage Manager&lt;/description&gt;
        &lt;jndiConfig&gt;
            &lt;name&gt;jdbc/test&lt;/name&gt;
        &lt;/jndiConfig&gt;
        &lt;definition type="RDBMS"&gt;
            &lt;configuration&gt;
                &lt;url&gt;jdbc:h2:repository/database/ES_STORAGE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000&lt;/url&gt;
                &lt;username&gt;sa&lt;/username&gt;
                &lt;password&gt;&lt;/password&gt;
                &lt;driverClassName&gt;org.h2.Driver&lt;/driverClassName&gt;
                &lt;maxActive&gt;50&lt;/maxActive&gt;
                &lt;maxWait&gt;60000&lt;/maxWait&gt;
            &lt;/configuration&gt;
        &lt;/definition&gt;
    &lt;/datasource&gt;

    &lt;!--datasource&gt;
        &lt;name&gt;SAMPLE_DATA_SOURCE&lt;/name&gt;
        ...
    &lt;/datasource--&gt;

&lt;/datasources&gt;
</code></pre>

<p></p>

<blockquote>
  <p>wso2-IS user-mgt.xml</p>
</blockquote>

<pre><code>&lt;UserManager&gt;
&lt;Realm&gt;
    &lt;Configuration&gt;
    &lt;AddAdmin&gt;true&lt;/AddAdmin&gt;
        &lt;AdminRole&gt;admin&lt;/AdminRole&gt;
        &lt;AdminUser&gt;
            &lt;UserName&gt;admin&lt;/UserName&gt;
            &lt;Password&gt;admin&lt;/Password&gt;
        &lt;/AdminUser&gt;
        &lt;EveryOneRoleName&gt;everyone&lt;/EveryOneRoleName&gt; &lt;!-- By default users in this role sees the registry root --&gt;
        &lt;Property name="isCascadeDeleteEnabled"&gt;true&lt;/Property&gt;
        &lt;!--Property name="dataSource"&gt;jdbc/WSO2CarbonDB&lt;/Property--&gt;
    &lt;Property name="dataSource"&gt;jdbc/JDBC_demo_user_store&lt;/Property&gt;
    &lt;/Configuration&gt;

    &lt;UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager"&gt;
          &lt;Property name="TenantManager"&gt;org.wso2.carbon.user.core.tenant.JDBCTenantManager&lt;/Property&gt;
          &lt;Property name="driverName"&gt;com.mysql.jdbc.Driver&lt;/Property&gt;
          &lt;Property name="url"&gt;jdbc:mysql://192.168.60.60:3306/JDBC_demo_user_store&lt;/Property&gt;
          &lt;Property name="userName"&gt;root&lt;/Property&gt;
          &lt;Property name="password"&gt;hamsa&lt;/Property&gt;
          &lt;Property name="Disabled"&gt;false&lt;/Property&gt;
          &lt;Property name="MaxUserNameListLength"&gt;100&lt;/Property&gt;
          &lt;Property name="MaxRoleNameListLength"&gt;100&lt;/Property&gt;
          &lt;Property name="UserRolesCacheEnabled"&gt;true&lt;/Property&gt;
          &lt;Property name="PasswordDigest"&gt;SHA-256&lt;/Property&gt;
          &lt;Property name="ReadGroups"&gt;true&lt;/Property&gt;
          &lt;Property name="ReadOnly"&gt;false&lt;/Property&gt;
          &lt;Property name="IsEmailUserName"&gt;false&lt;/Property&gt;
          &lt;Property name="DomainCalculation"&gt;default&lt;/Property&gt;
          &lt;Property name="StoreSaltedPassword"&gt;true&lt;/Property&gt;
          &lt;Property name="WriteGroups"&gt;true&lt;/Property&gt;
          &lt;Property name="UserNameUniqueAcrossTenants"&gt;false&lt;/Property&gt;
          &lt;Property name="PasswordJavaRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="PasswordJavaScriptRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="UsernameJavaRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="UsernameJavaScriptRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="RolenameJavaRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="RolenameJavaScriptRegEx"&gt;^[\S]{5,30}$&lt;/Property&gt;
          &lt;Property name="SCIMEnabled"&gt;true&lt;/Property&gt;
          ... Same As Wso2-AM user-mgt.xml
    &lt;/UserStoreManager&gt; 

    &lt;AuthorizationManager class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager"&gt;
        &lt;Property name="AdminRoleManagementPermissions"&gt;/permission&lt;/Property&gt;
        &lt;Property name="AuthorizationCacheEnabled"&gt;true&lt;/Property&gt;
        &lt;Property name="GetAllRolesOfUserEnabled"&gt;false&lt;/Property&gt;
    &lt;/AuthorizationManager&gt;
&lt;/Realm&gt;
</code></pre>

<p></p>

<blockquote>
  <p>wso2-IS master-datasources.xml</p>
</blockquote>

<pre><code>&lt;datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration"&gt;

&lt;providers&gt;
    &lt;provider&gt;org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader&lt;/provider&gt;
&lt;/providers&gt;

&lt;datasources&gt;

    &lt;datasource&gt;
        &lt;name&gt;WSO2_CARBON_DB&lt;/name&gt;
        &lt;description&gt;The datasource used for registry and user manager&lt;/description&gt;
        &lt;jndiConfig&gt;
            &lt;name&gt;jdbc/WSO2CarbonDB&lt;/name&gt;
        &lt;/jndiConfig&gt;
        &lt;definition type="RDBMS"&gt;
            &lt;configuration&gt;
                &lt;url&gt;jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000&lt;/url&gt;
                &lt;username&gt;wso2carbon&lt;/username&gt;
                &lt;password&gt;wso2carbon&lt;/password&gt;
                &lt;driverClassName&gt;org.h2.Driver&lt;/driverClassName&gt;
                &lt;maxActive&gt;50&lt;/maxActive&gt;
                &lt;maxWait&gt;60000&lt;/maxWait&gt;
                &lt;testOnBorrow&gt;true&lt;/testOnBorrow&gt;
                &lt;validationQuery&gt;SELECT 1&lt;/validationQuery&gt;
                &lt;validationInterval&gt;30000&lt;/validationInterval&gt;
                &lt;defaultAutoCommit&gt;false&lt;/defaultAutoCommit&gt;
            &lt;/configuration&gt;
        &lt;/definition&gt;
    &lt;/datasource&gt;
&lt;datasource&gt;
        &lt;name&gt;JDBC_demo_user_store&lt;/name&gt;
        &lt;description&gt;The datasource used for JDBC_demo_user_store&lt;/description&gt;
        &lt;jndiConfig&gt;
            &lt;name&gt;jdbc/JDBC_demo_user_store&lt;/name&gt;
        &lt;/jndiConfig&gt;
        &lt;definition type="RDBMS"&gt;
            &lt;configuration&gt;
                &lt;url&gt;jdbc:mysql://192.168.60.60:3306/JDBC_demo_user_store&lt;/url&gt;
                &lt;username&gt;root&lt;/username&gt;
                &lt;password&gt;hamsa&lt;/password&gt;
                &lt;driverClassName&gt;com.mysql.jdbc.Driver&lt;/driverClassName&gt;
                &lt;maxActive&gt;50&lt;/maxActive&gt;
                &lt;maxWait&gt;60000&lt;/maxWait&gt;
                &lt;testOnBorrow&gt;true&lt;/testOnBorrow&gt;
                &lt;validationQuery&gt;SELECT 1&lt;/validationQuery&gt;
                &lt;validationInterval&gt;30000&lt;/validationInterval&gt;
            &lt;/configuration&gt;
        &lt;/definition&gt;
&lt;/datasource&gt;
    &lt;!-- For an explanation of the properties, see: http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html --&gt;
    &lt;!--datasource&gt;
        &lt;name&gt;JDBC_demo_user_store&lt;/name&gt;
        ...
    &lt;/datasource--&gt;

&lt;/datasources&gt;
</code></pre>

<p></p>