This is a complementary answer for the specific case of you using AWS cloud computing (either EC2 or RDS machines).
Besides doing everything proposed above, when using AWS cloud computing you will need to set you inbound rules in a way that let you access to the ports. Please check this post, which is valid for EC2 and RDS.