Cannot connect to my AWS RDS instance from my local computer - amazon-web-services

I set a new MariaDB RDS instance in AWS and added Inboun and Outbound rules to Security Groups but when I try to connect to the RDS Endpoint via mysql console I am always getting this error:
ERROR 2003 (HY000): Can't connect to MySQL server on 'db-xxxxxxx.eu-central-1.rds.amazonaws.com' (10060 "Unknown error")
I am newbie in AWS.

You have to create an externally accessible instance in RDS. Publicly accessible has to be true.

Related

AWS RDS (mysql) instance not connecting to local machine

I am trying to connect the AWS RDS Instance on a local machine using Datagrip. The RDS instance have public access and inbound traffic is allowed from my IP address + all traffic is allowed for testing, but keep getting connection error. Screenshots are attached below, not sure what's causing this.

Unable to connect to my Aurora PostgreSQL server via pgadmin

I have created a VPC and Aurora PostgreSQL deployed it using CDK, public accessibility has been enabled in the RDS and it is in the Isolated Subnet, when I try to connect it using pgAdmin, it gives a timeout error, even I have changed the Security Group Inbound to Allow All ip's.

Unable to connect to server: timeout expired AWS aurora rds

I am trying to connect my AWS aurora database with pgAdmin 4 and it throws this error. I have tried all the previous solutions provided by the stack overflow answers like add inbound my IP and update pg_hab.conf. It still not working for me. Thank you in advance.
Error facing with pgAdmin
Aurora serverless can be only accessed from within VPC. It has no public Ip address. From docs:
You can't give an Aurora Serverless v1 DB cluster a public IP address. You can access an Aurora Serverless v1 DB cluster only from within a VPC.
This means you either have to connect to it from an EC2 instance running in the same VPC, or setup ssh tunneling or VPN connection between your local computer and the aurora. How to setup ssh tunnel is explained here and here.
Alternatively, use DATA API to interact with your database from outside of a VPC.

Connect to Aurora Serverless using EC2 as Proxy

Not a duplicate of AWS Aurora MySQL serverless: how to connect from MySQL Workbench.
Aurora Serverless doesn't support public connections yet.
I used Cloud9 to create an EC2 instance on the same VPN as the database. I then connected to the database from the Cloud9 terminal.
My (GraphQL Prisma) service that I'm attempting to host (on Zeit Now) only takes a HOST and a PASSWORD for configuration.
How can I make the EC2 instance act as a proxy that I can treat exactly as a database endpoint. Can tunneling fully do that and I'm just bad at it?
I think this blog may help you. The idea, is make a forwarding port from ec2-dns:3306 to aurora-serverless-cluster-dns:3306

AWS DMS issue with source endpoint in EC2-classic

We are using several EC2-Classic servers (Linux Ubuntu) with following configuration: mounted EBS volumes and on them is running Server version: 5.5.48-MariaDB
I would like to use AWS DMS (AWS Database Migration Service) and to migrate our EBS DBs to the RDS AuroraDB in new VPC.
I created VPC, AuroraDB (not public accessible), AWS DMS replication instance and endpoints.
From EC2-classic instance I am able to open remote AuroraDB console (thanks to Classic Link), which is in the VPC.
Target endpoint (to the AuroraDB) works OK and TEST was finished successful
Source Endpoint show me following error:
Operation:testEndpointDetails:[errType=ERROR_RESPONSE,
status=122502, errMessage=Cannot connect to ODBC provider 122502 ODBC general error.,
errDetails= RetCode: SQL_ERROR SqlState: HY000 NativeError: 2003 Message: unixODBCMySQL http://ODBC 5.3(w)
DriverCan't connect to MySQL server on 'Private.DNS.name' (110) http://122502] ODBC general error.
I tried to set like Server name
Private/Public DNS, and Private/Public IP, still same.
Credentials are OK, and I am not using any special characters.
I am operate in North Virginia Region.
AWS DMS replication instance is set as Public.
I am able to log into MariaDB console from remote EC2-classic instance.
I tried set port 3306 and Private/Public IP of AWS DMS replication instance into right Security Groups, but I guess that I still miss something, probably in the SG area, but I am not sure.
I had the same issue with the same error message and it was a network issue. My replication instance didn't have access to the database.
My database is in a VPC with a subnet x and my replication instance is in the same VPC with the same subnet x. I opened the 3306 port in my Network ACL and in the security group of the database to the Internet (0.0.0.0/0) just to test if it was a network problem. The connection test worked with those settings. After the test, I removed the last setting for security.
The solution to my problem was to open the 3306 port in the security group and in the network ACL of the database to all the vpc connection. e.g. 172.0.0.0/16.
Hope it helps
You must add the security group from your DMS replication instance to your RDS database associated security group as an authorised inbound traffic.
Go to Database Migration Service dashboard and them to "Replication Instances"
Select your replication instance to get the "VPC Security Group"