问题
I am running MySQL on an Amazon AWS Instance. I was able to previously connect to the MySQL Database via MySQL Query Browser. Now I am traveling outside the U.S. and I am having trouble connecting via the Query Browser. I am able to use Terminal to create an ssh connection and then login to MySQL, so it does not appear to be a larger issue with the MySQL Database.
Has anyone else had a similar problem? Any ideas how I can fix this?
This is the error I get from the MySQL Browser
Your connection attempt failed for user 'admin' from your host to server at ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:3306: Can't connect to MySQL server on 'ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com' (4)
Please: 1 Check that mysql is running on server ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the admin has rights to connect to ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com from your address (mysql rights define what clients can connect to the server and from which machines)
4 Make sure you are both providing a password if needed and using the correct password for ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com connecting from the host address you're connecting from
The only possible problem I see could be #4, but I ran and re-ran this command via Terminal:
grant all privileges on *.* to 'admin'@'%' identified by '<pass>' with grant option;
来源:https://stackoverflow.com/questions/8995414/connecting-to-mysql-on-aws-via-query-browser-while-outside-the-u-s