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?