RDS won't connect to MySQL Workbench or Power BI

0

Hello,

My RDS won't connect to MySQL Workbench or Power BI.

  • MySQL Workbench error: "Failed to connect to MySQL at [endpoint URL] with user [username]. Unable to connect to localhost".
  • Power BI error: "We encountered an error while trying to connect. MySQL: Unable to connect to any of the specified MySQL hosts."

Actions taken so far:

  • Confirmed endpoint URL is correct, per Connectivity & security > Endpoint & port > Endpoint
  • Confirmed port is correct, from the same location
  • Added my IP address to the Inbound rules of the security group
  • Database username and password are correct

I also zapped the whole database, started again, and tried again with the new details but that didn't solve it.

Thanks for any guidance.

Simon
asked 14 days ago224 views
2 Answers
0

Hi

MySQL Workbench error: "Failed to connect to MySQL at [endpoint URL] with user [username]. Unable to connect to localhost".

  • Ensure you're using the "Standard (TCP/IP)" connection method in Workbench.
  • Verify that the hostname or address field points directly to the RDS endpoint URL, not "localhost". There might be separate fields for hostname and port.
  • If the problem persists, try creating a new connection profile in Workbench specifically for your RDS instance. This can help avoid any misconfigurations in existing profiles.

Security Groups are Key Point

  • While you added your IP, ensure the Inbound rule allows connections from your specific IP address, not just "0.0.0.0/0" (which opens it to everyone).
  • If your RDS instance in Private Network and you allowed IP in Security Group it doesnt work
  1. You need to in VPN - either Site to Site or OpenVPN or you need to try from Windows Machine in the VPC where RDS is present
  2. or RDS must be enabled Public access - Which is NOT recommended for the Databases.
  • Verify the rule allows connections on port 3306 (the default MySQL port). Make sure you have a separate security group rule for Power BI if it uses a different port to connect.
  • Try to telnet 3306 of RDS endpoint to see you have network rachbility

References: https://repost.aws/questions/QUMMdtDKebSlSOTq3nAFiqXQ/connecting-to-rds-via-mysql-workbench-difficulties

https://repost.aws/questions/QUACnox9z3TP-2zzZypg_UYQ/can-t-connect-mysql-workbench-to-my-aurora-rds-database

profile picture
EXPERT
GK
answered 14 days ago
  • Thanks for your help.

    I'm using the "Standard (TCP/IP)" connection method in Workbench and entering the details as you described. I made a new profile, but that didn't work.

    The database is publicly accessible, and I've changed the rule from my IP to any (it's an empty database at the moment), just to troubleshoot. That still fails.

0

Hello.

Are you connecting to MySQL Workbench from your local PC?
In that case, public access must be enabled in RDS.
It is also necessary to confirm that the subnet where RDS is running is a public subnet.
https://repost.aws/knowledge-center/rds-connectivity-instance-subnet-vpc

By the way, public access is not recommended from a security perspective, so I think it is better to connect from MySQL Workbench using the port forwarding function of Session Manager, which is introduced in the document below.
https://aws.amazon.com/jp/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/

profile picture
EXPERT
answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions