首页 > 解决方案 > 我正在尝试使用 wso2 中的 MySQL 更改我的注册表数据库是 5.9.0 并按照步骤操作,但它没有反映在控制台中?

问题描述

我遵循了以下文档 - https://is.docs.wso2.com/en/5.9.0/setup/changeing-to-mysql/

我还尝试仅针对上述用例更改 LDAP 用户存储,是否需要使用 MySQL https://is.docs.wso2.com/en/5.9.0/进行用户存储 LDAP 或 JDBC设置/配置-a-jdbc-user-store/

这是我的 deployment.toml 文件配置-

[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"

并且更改并未反映在 WSO2 控制台中,它仍显示 H2 数据库- 在此处输入图像描述

标签: jdbcwso2wso2iswso2carbonwso2dss

解决方案


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. 

因此,将以下配置添加到 deployment.toml 是没有用的。

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

在管理控制台中,它按预期显示 H2 中的 CARBON_DB 位置。建议在生产环境中将嵌入式 LDAP 用户存储更改为其他内容。您可以在此处将其指向 JDBC、LDAP 或 Active Directory 用户存储。


推荐阅读