Unable to connect to localhost

0

How do I connect to localhost from MySQL Workbench? Cluster parameters:

  1. Engine: Aurora (MySQL 5.7) 2.10.3
  2. VPC security group: default and allow-prod-corp-port-81928200
  3. Database authentication: password authentication MySQL Workbench parameters:
  4. Connection method: Standard (TCP/IP)
  5. Hostname: using correct host address
  6. Port: 8192
  7. Username: using correct master user name
  8. Password: using correct master password Results:
  9. From test connection: Failed to connect to MySQL at <database address>:8192 with user <master user name> . Unable to connect to localhost.
  10. From open connection: Cannot connect to database server. Your connection attempt failed for <username> at <database address>:8192. Unable to connect to localhost.
Carlos
已提問 1 年前檢視次數 2527 次
2 個答案
0

I have seen this error: 'Unable to connect to localhost' in MySQL workbench, when trying to connect to an RDS Proxy.

In my case my VPC Endpoints associated with the RDS Proxy Endpoints had the wrong security group. You can find the vpc endpoint easily by doing an nslookup to the RDS Proxy Endpoint, and then search for it in VPC Web Console.

已回答 8 個月前
-1

Hi,

If you want to connect to a private Amazon RDS DB instance from a local machine, see this article: https://repost.aws/knowledge-center/rds-connect-ec2-bastion-host.

Otherwise, you need to use the Aurora MySQL Endpoint. Here is a step by step workshop that shows how to connect to Aurora MySQL with MySQL Workbench : https://catalog.us-east-1.prod.workshops.aws/workshops/f4734fd8-d4ca-4926-a211-ac57679acfb4/en-US/04-sql-to-aurora-mysql/04-convalidate/04-auroraconnect.

The documentation should help as well: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Connecting.html

Regards,

Jon

profile pictureAWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南