问题描述
我遵循WSO2文档(https://apim.docs.wso2.com/en/latest/install-and-setup/setup/setting-up-databases/changing-default-databases/changing-to-mysql/)将默认数据库更改为MysqL。 我执行了以下步骤:
- 使用MysqL 8.0客户端创建了2个名为wso2am_db和wso2shared_db的数据库。
- 运行脚本以在两个数据库中创建所需的表。
- 创建了一个名为wso2carbon的用户,并授予了两个数据库的访问权限。
- 确认已成功创建数据库,表和用户。
- 如下所示在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服务器时,我在终端中收到以下错误,并且服务器无法启动。
此消息后卡住,此后什么也没出现。我在哪里出错了?需要帮助。
解决方法
这可能是由于连接到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"