I was trying to use AWS Aurora Serverless for MySQL in my project, but I am impossible to connect to it, though I have the endpoint, username, password.
What I have done:
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)
Did I make any wrong steps ? Please advice me.
****EDIT****
I tried to create another Aurora database with capacity type: Provisioned. I can connect to the endpoint seamlessly with username and password by MySql workbench. It means that the port 3306 is opened for workbench.
About the security group:
Follow the steps below to connect MySQL Workbench to your Amazon RDS DB instance: Download and install MySQL Workbench. Open MySQL Workbench, and choose the ⊕ sign beside MySQL Connections to set up a new connection. In the Setup New Connection dialog box, enter a suitable name for your connection.
Aurora combines the performance and availability of traditional enterprise databases with the simplicity and cost-effectiveness of open-source databases. Amazon Aurora MySQL is compatible with MySQL 5.6 and MySQL 5.7, and is now also compatible with MySQL 8.0.
In the navigation pane, choose Databases, and then select the Aurora DB instance in the Aurora Cluster that you want to modify. Choose Modify. From the Modify DB instance page, under Connectivity, expand the Additional Configuration section. Set Public access to Yes or No.
From 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.
So, aside from SSH-ing through an EC2 instance, you can also access your serverless cluster with mySQL Workbench with AWS Direct Connect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With