0

I recently changed internet providers, which involved changing my router. Since the switch, I have been unable to connect directly to a (previously working) AWS MySQL database, which I am doing through the terminal on my machine. The specific error is:

ERROR 2005 (HY000): Unknown MySQL server host

I can connect to the database via a hotspot on my phone, so:

  • The connection details I am using are correct
  • The issue is not that my new static IP address needs to be allowed in AWS

Based on this answer it looks like it might be a port forwarding issue? I can set up port forwarding rules in my router (see screengrab), but this doesn't seem to make any difference.

What could be the reason I am unable to connect through my new router and what would be a possible solution?

enter image description here

1 Answer 1

1

looks like it might be a port forwarding issue?

Not really. Port forwarding aka reverse NAT aka destination NAT is used for connecting from public Internet to private LAN (for an exposed server/service).

You problem seems to be connecting from a client in private LAN to a server on the public Internet. That requires source NAT/NAPT which most often just works. If everything else does work for you, the most likely problem is a default filter for outgoing connections to TCP port 3306. You need to deactivate that filter or - better - add a rule specifically permitting the connection you require.

For more specific advice we'd need to know the model of the router and its config - note that consumer-grade hardware (your screenshot looks like that) or devices without optional, paid vendor support are explicitly off-topic here though.

3
  • That's really helpful thanks @Zac67 - I'm a software dev so working this stuff out as I go along. It's a "business" router, but I think it's probably just a consumer router with a different sticker, so I won't go down that rabbit hole. The difficulty I'm having is that I'm able to connect via my mobile, which suggests to me I need to change something on the router itself but the options seem very limited? Commented Oct 10, 2023 at 10:45
  • If it's an ISP router I'd contact them for support. Possibly it's managed by them, leaving few options to you.
    – Zac67
    Commented Oct 10, 2023 at 10:53
  • Thank you - will do Commented Oct 10, 2023 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.