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.
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
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인