我使用 EC2 和 RDS(MySQL) 部署了 Spring Boot 服务器。
安全组的设置方式是这样的:
EC2
RDS
它们位于同一 VPC 和 AZ。
当我在 EC2 中运行服务器时,它会连接到 RDS,但是当我尝试从 Mac 上使用 DBeaver 访问 RDS 时,我总是得到:
Connection Timed Out.
Communications Link failure
The last packet sent successfully to the server was 0 milliseconds ago.
The driver has no received any packets from the server.
Connection Timed Out.
更新
这样我就可以通过 SSH 成功连接到我的 EC2 了