2

I followed the following documentations- https://is.docs.wso2.com/en/5.9.0/setup/changing-to-mysql/

I had also tried changing the LDAP user store just for the above use case is it neccesary to do AND which is best for user store LDAP or JDBC using MySQL https://is.docs.wso2.com/en/5.9.0/setup/configuring-a-jdbc-user-store/

This is my deployment.toml file configuration-

[server]
hostname = "localhost"
node_ip = "127.0.0.1"
base_path = "https://$ref{server.hostname}:${carbon.management.port}"

[super_admin]
username = "admin"
password = "admin"
create_admin_account = true

[user_store]
type = "database"
TenantManager="org.wso2.carbon.user.core.tenant.JDBCTenantManager"
ReadOnly=false
ReadGroups=true
WriteGroups=true

[database.user]
url = "jdbc:mysql://localhost:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"
driver = "com.mysql.jdbc.Driver"

[realm_manager]
data_source = "WSO2USER_DB"

[database.carbon_db]
type = "mysql"
url= "jdbc:mysql://127.0.0.1:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"

[database.identity_db]

type = "mysql"
url= "jdbc:mysql://127.0.0.1:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"

[database.shared_db]
type = "mysql"
url= "jdbc:mysql://127.0.0.1:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"

[keystore.primary]
name = "wso2carbon.jks"
password = "wso2carbon"

And the change are not reflecting in the WSO2 Console it is still showing H2 database- enter image description here

Community
  • 1
  • 1
Aman Prakash
  • 340
  • 4
  • 15

1 Answers1

2
Wso2 Identity 5.9.0 separates its databases into 3 parts as IDENTITY_DB, CARBON_DB, SHARED_DB. You can read about what they handle in 

https://is.docs.wso2.com/en/5.9.0/setup/changing-to-mysql/ this documentation. 

From the above 3 databases, CARBON_DB cannot be pointed to another database type other than H2. CARBON_DB contains internal information and you will not have a requirement to change its database source. 

Hence adding the below configuration to the deployment.toml is useless.

[database.carbon_db]
type = "mysql"
url= "jdbc:mysql://127.0.0.1:3306/regdb?useSSL=false"
username = "regadmin"
password = "regadmin"

in the management console, it displays the CARBON_DB location which is in the H2 as expected. Changing the embedded LDAP user store to something else is recommended in production environments. Here you can point it to a JDBC, LDAP, or Active Directory user store.

  • Thank you........... but can you tell me how can i check which user store is in use and which database is in use for shared and identity db???? – Aman Prakash Dec 03 '19 at 06:50
  • And can you also tell me that rest of my configuration is correct in deployement.toml – Aman Prakash Dec 03 '19 at 06:53
  • 1
    if you have a requirement to have 3 databases for IDENTITY_DB, SHARED_DB and user store you can do that by changing the database configurations such as URL, user name, and password. Required Database scripts can be found in the above documentation. As per your current configuration, you are using only one SQL database regdb for storing all the above data. – Buddhima Udaranga Dec 03 '19 at 06:59
  • 1
    https://is.docs.wso2.com/en/5.9.0/setup/working-with-databases/ Refer this you will have a more idea about what i said – Buddhima Udaranga Dec 03 '19 at 07:06
  • Sir i want to use only one db for all but my question is how can i check wheather H2 database or MySQL is in use ???????????? – Aman Prakash Dec 03 '19 at 07:50
  • 1
    After pointing and starting the identity server. login to your MySQL database regdb from any database client. check table 'UM_HYBRID_USER_ROLE' or 'UM_SYSTEM_USER' if these tables has data you have pointed your User store successfully to MySQL. check 'IDN_OAUTH2_SCOPE' table if it has data then your Identity database is successfully pointed. Do some registry changes such as add new email template and check the 'REG_LOG' table. if it has logs then you have pointed the shared db successfully. https://is.docs.wso2.com/en/5.9.0/learn/customizing-automated-emails/#adding-an-email-template – Buddhima Udaranga Dec 03 '19 at 07:59