数据库
首页 > 数据库> > AWS Aurora MySQL无服务器:如何从MySQL Workbench连接

AWS Aurora MySQL无服务器:如何从MySQL Workbench连接

作者:互联网

我试图在我的项目中使用AWS Aurora Serverless for MySQL,但我无法连接到它,尽管我有端点,用户名和密码.

我做了什么:

>从AWS控制台管理,我选择RDS>实例> Aurora>无服务器
>保留默认设置
>创建数据库
> AWS仅会创建AWS群集
enter image description here
>我打开MySQL Workbench,并使用端点,用户名,密码连接数据库

Ressult:

Your connection attempt failed for user ‘admin’ from your host to
server at xxxxx.cluster-abcdefg1234.eu-west-1.rds.amazonaws.com:3306:
Can’t connect to MySQL server on
‘xxxxx.cluster-abcdefg1234.eu-west-1.rds.amazonaws.com’ (60)

我做错了吗?请指教.

****编辑****

我尝试使用容量类型创建另一个Aurora数据库:Provisioned.我可以使用MySql workbench的用户名和密码无缝连接到端点.这意味着端口3306为工作台打开.

关于安全组:
enter image description here

解决方法:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/aurora-serverless.html开始:

  • You can’t give an Aurora Serverless DB cluster a public IP address.
  • You can access an Aurora Serverless DB cluster only from within a
    virtual private cloud (VPC) based on the Amazon VPC service.
  • You can’t access an Aurora Serverless DB cluster’s endpoint through an
    AWS VPN connection or an inter-region VPC peering connection. There
    are limitations in accessing a cluster’s endpoint through an
    intra-region VPC peering connection; for more information, see
    Interface VPC Endpoints (AWS PrivateLink) in the Amazon VPC User
    Guide. However, you can access an Aurora Serverless cluster’s
    endpoint through an AWS Direct Connect connection.

因此,除了通过EC2实例进行SSH访问外,您还可以使用带有AWS Direct Connect的mySQL Workbench访问无服务器群集.

标签:serverless,mysql,amazon-web-services,amazon-rds-aurora
来源: https://codeday.me/bug/20190930/1835867.html