我尝试通过 MySQL Workbench 连接到 AWS RDB (MySQL),但无法建立连接。数据库的 URL、名称和密码已正确配置并且几天前实际运行。我什至用 net stat 检查了端口,它说它正在被 MySQL 使用(这是正确的)。问题出在哪里?
(下图)
错误:
MySQL验证:
运行实例验证 (AWS):
MySQL WB 配置验证:
公共(public)可访问性:
数据库安全组:
最佳答案
这来自官方文档:
By default, network access is turned off to a DB instance. You can specify rules in a security group that allows access from an IP address range, port, or EC2 security group. Once ingress rules are configured, the same rules apply to all DB instances that are associated with that security group. You can specify up to 20 rules in a security group.
在连接和安全下检查与 mysql RDS 关联的安全组,并使用本地公共(public) IP 地址添加新的入站 MySQL 类型 TCP 规则。
关于MySQL 实例无法连接 (AWS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56138227/