简体   繁体   English

无法连接到 AWS RDS 上的服务器

[英]Can't connect to server on AWS RDS

ı try conncet my sql database on amazon aws我尝试在亚马逊 AWS 上连接我的 sql 数据库

mysql -h database-2.csgofm1hhtui.eu-central-1.rds.amazonaws.com -P 3306 -u ismail -p

But i recieve this exception但我收到这个例外

ERROR 2002 (HY000): Can't connect to server on 'database-2.csgofm1hhtui.eu-central-1.rds.amazonaws.com' (10060)

Maybe a stupid question, but have you opened inbound Security Group rules?也许是个愚蠢的问题,但是您是否打开了入站安全组规则?

This error is a result of the inbound connection rule set on your DB instance.此错误是数据库实例上设置的入站连接规则的结果。

In AWS RDS console, under 'Databases', click on the 'DB Identifier' of your RDS instance.在 AWS RDS 控制台的“数据库”下,单击 RDS 实例的“数据库标识符”。 Then in the 'Security group rules' section, click on 'Inbound' type security group and edit the inbound rule to allow appropriate inbound connections.然后在“安全组规则”部分,单击“入站”类型的安全组并编辑入站规则以允许适当的入站连接。

IF you are trying to connect from an EC2 instance, then the Inbound connection can be the security group of your EC2 instance on port 3306.如果您尝试从 EC2 实例连接,则入站连接可以是端口 3306 上的 EC2 实例的安全组。

See point 4 in the following link: Create a VPC security group for a private DB instance请参见以下链接中的第 4 点: Create a VPC security group for a private DB instance

If its not Security Group, then it could be a route table issue.如果不是安全组,则可能是路由表问题。

AWS Knowledge Center - How do I resolve problems when connecting to my Amazon RDS DB instance? AWS 知识中心 - 如何解决连接到我的 Amazon RDS 数据库实例时出现的问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS:无法从我的机器连接到 RDS 数据库 - AWS: can't connect to RDS database from my machine 无法连接到 AWS RDS 上的 SQL 服务器 - Unable to connect to SQL Server on AWS RDS 为什么 AWS App runner 在可公开访问时无法连接到 RDS Postgres 数据库? - Why AWS App runner can't connect to RDS Postgres database when it is publicly accessible? HeidiSQL 无法连接到我的 RDS 数据库? - HeidiSQL can't connect to my RDS database? 如何连接到 Aws Oracle RDS 创建的 Oracle 服务器 - How to connect to Oracle server created by Aws Oracle RDS 无法在 Asp.net 核心应用程序中连接到 RDS - Can't connect to RDS in Asp.net core application 主用户无法连接到 Aurora 中的现有数据库 MySQL - RDS - Master user can't connect to an existing database in Aurora MySQL - RDS 无法在我的笔记本电脑上连接到 AWS RDS(尽管我的 laravel 应用程序通过弹性 beantalk 托管可以与 RDS 交互) - Unable to connect to AWS RDS on my laptop (although my laravel app which is hosted via elastic beanstalk can interact with the RDS) 无法将aws RDS连接到本地django - Unable to connect aws RDS to django local 如何将 AWS Lambda 与多个 RDS 模式连接 - How to connect AWS Lambda with multiple RDS schemas
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM