-2

I'm running MySQL server on an EC2 instance on AWS. I've configured security groups to listen at port 3306 and port 22(ssh only from my ip!). But to my surprise, I wasn't able to remotely connect to my ec2 instance on port 3306 from one of my networks as it always gives connection refused, but when I switched my network I'm able to connect.

I'm unable to understand this behaviour as both my networks are working absolutely fine and also I'm not sure if I face similar kind of issue in future, how will I be sure that port 3306 is working?

Amanda
  • 19
  • 5

1 Answers1

0

Only MySQL uses port 3306. You can use netstat command to check if port 3306 is being used or not. Also you can check the firewall rule of the network ( from which you are not able to connect) if something is preventing to connect port 3306. I am assuming that all security inbound and outbound rules are already present.