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
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ