问题
I try to install a WSO2 3.0.0 APIM instance with the traffic-manager profile. Is it possible to configure the MB_STORE datasource to a mysql configuration through the deployment.toml file ? The master-datasources.xml is always overrided at startup with the default h2 database for the MB_STORE datasource.
回答1:
You can configure the MB source datasource by adding following configurations in <AM-home>/repository/conf/deployment.toml:
[[datasource]]
id = "WSO2_MB_STORE_DB"
url = "jdbc:mysql://<ip-address>:<port>/mb_store"
username = "username"
password = "password"
driver = "com.mysql.jdbc.Driver"
validationQuery = "SELECT 1"
pool_options.maxActive = 50
pool_options.maxWait = 60000
pool_options.validationInterval = 30000
pool_options.defaultAutoCommit = false
To configure the Carbon DB / AM_DB, adding following configurations is sufficient as they are pre-configured, for other databases, you need to add all the above mentioned configurations.
[database.apim_db]
type = "mysql"
url = "jdbc:mysql://localhost:3306/am_db"
username = "username"
password = "password"
[database.shared_db]
type = "mysql"
url = "jdbc:mysql://localhost:3306/reg_db"
username = "username"
password = "password"
回答2:
From deployment.toml it is not possible to configure the MB_STORE. This data source is configured to run in H2 as it does not contain important data. If you want to change this to Mysql, you can edit master-datasources.xml.j2 file in wso2am-3.0.0/repository/resources/conf/templates/repository/conf/datasources
来源:https://stackoverflow.com/questions/59068915/wso2-apim-3-0-0-mb-store-database