无法将 AWS Aurora Serverless 数据库连接到 MySQL Workbench

问题描述

我使用以下命令创建了一个 aurora 无服务器数据库

 aws rds create-db-cluster --db-cluster-identifier db-test --engine aurora-MysqL --engine-version 5.7.MysqL_aurora.2.07.1 --engine-mode serverless --scaling-configuration MinCapacity=1,MaxCapacity=2,SecondsUntilAutopause=1000,Autopause=true --master-username xxx --master-user-password xxx  --db-cluster-parameter-group-name xxx  --db-subnet-group-name xxx --vpc-security-group-ids xxxxx xxxxxx

数据库集群已创建并显示“可用”,但我无法将其连接到 MysqL Workbench,错误消息:

Failed to Connect to MysqL at xxxx xxxx with user xxx

当我尝试使用不同的 AWS 账户并且它工作正常时,我认为可能是因为 VPC/安全组?我是新手,有人知道为什么会这样吗?

我为所有流量设置的入站和出站安全组,但它仍然无法正常工作,我不完全理解这一点....有人可以帮忙吗?谢谢。

解决方法

这通常意味着您没有正确设置入站规则。如本 AWS RDS tutorial 中所述,您需要确保正确设置入站规则。设置它们时,请尝试在 AWS 管理控制台中为您的开发环境使用我的 IP

enter image description here