问题
Just created new AWS RDS MySql instance with default settings and user/pass.
Also I set it to be publicly available
and to create a new VPC during the process.
Currently can not connect from my laptop to this RDS:mysql -h endpoint -u myusername -p
error:
ERROR 2003 (HY000): Can't connect to MySQL server on 'endpoint' (60)
How to allow access to it from e.g. my laptop and other computers? If is trough some security groups - where exactly to change and associate with new RDS instance trough console?
Thanks.
回答1:
On the instance page, just under the monitoring graphs there is a connect
block with a list of security groups.
There should be 1 group of type security group - inbound
On that security group's page you should have an inbound
tab at the bottom.
Click on Edit
et add a new rule for your current IP. Make sure the port is correct.
Now you should be able to connect with mysql -h [ENDPOINT] -P [PORT] -u [USERNAME] -p
If you are behind a proxy this may still fail. You'll have to tunnel your way in or used a shared wifi connection.
来源:https://stackoverflow.com/questions/51285394/aws-rds-mysql-how-to-allow-access-after-setting-publicly-available