Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Aurora MySQL serverless: how to connect from MySQL Workbench

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:

  1. From AWS console managment, I select RDS > Instances > Aurora > Serverless
  2. Leave the default settings
  3. Create database
  4. AWS will only create an AWS Cluster enter image description here
  5. I open MySQL Workbench, and use endpoint, username, password to connect the database

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: enter image description here

like image 801
Phong Vu Avatar asked Aug 06 '18 22:08

Phong Vu


People also ask

How do I connect to AWS MySQL workbench?

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.

Is AWS Aurora compatible with MySQL?

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.

How do I make Aurora Serverless publicly accessible?

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.


1 Answers

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.

like image 105
Yoga Avatar answered Sep 28 '22 11:09

Yoga