将默认数据库更改为MySQL后,WSO2 APIM服务器无法启动

时间:2020-09-16 11:59:17

标签: wso2 wso2-am

我遵循WSO2文档(https://apim.docs.wso2.com/en/latest/install-and-setup/setup/setting-up-databases/changing-default-databases/changing-to-mysql/)将默认数据库更改为MySQL。 我执行了以下步骤:

  1. 使用MySQL 8.0客户端创建了2个名为wso2am_db和wso2shared_db的数据库。
  2. 运行脚本以在两个数据库中创建所需的表。
  3. 创建了一个名为wso2carbon的用户,并授予了两个数据库的访问权限。
  4. 确认已成功创建数据库,表和用户。
  5. 如下所示在Deployment.toml文件中进行所需的配置更改。

[database.apim_db]

type =“ mysql”

driver =“ com.mysql.cj.jdbc.Driver”

url =“ jdbc:mysql:// localhost:3306 / wso2am_db”

用户名=“ wso2carbon”

密码=“ wso2carbon”

[database.shared_db]

type =“ mysql”

driver =“ com.mysql.cj.jdbc.Driver”

url =“ jdbc:mysql:// localhost:3306 / wso2shared_db”

用户名=“ wso2carbon”

密码=“ wso2carbon”

但是在重新启动WSO2 APIM服务器时,我在终端中收到以下错误,并且服务器无法启动。

enter image description here

此消息后卡住,此后什么也没出现。我在哪里出错了?需要帮助。

enter image description here

1 个答案:

答案 0 :(得分:2)

这可能是由于连接到SQL Server时相互SSL连接失败而发生的。您可以使用Deployment.toml文件中的以下配置重试一次吗?

[database.apim_db]
type = "mysql"
url = "jdbc:mysql://localhost:3306/wso2am_db?useSSL=false"
username = "wso2carbon"
password = "wso2carbon"

[database.shared_db]
type = "mysql"
url = "jdbc:mysql://localhost:3306/wso2shared_db?useSSL=false"
username = "wso2carbon"
password = "wso2carbon"