Connect to MySQL on AWS from local machine

前端 未结 6 1897
轮回少年
轮回少年 2020-12-23 11:48

I am trying to set up a dev environment on my local machine that accesses a MySQL DB on AWS, but I keep getting a \"Can\'t connect\" message.

mysql_connect(\         


        
6条回答
  •  爱一瞬间的悲伤
    2020-12-23 12:11

    When we create RDS need to configured the firewall to accept mySQL connections from local or other instance, as such the packet is being dropped at the firewall level, to resolve this you need to:

    • Login into your AWS console Go to RDS

    Note down the security group of your mySQL server (in my case awseb-e)

    • click security groups
    • click your group in the center menu awseb
    • click inbound tab

    Select mySQL from the list, add the details of your client server and save the rule

    NOTE : once you choose my IP ,AWS select your IP , if you need other ip use

    https://www.whatismyip.com/my-ip-information/

    and add your IP4 IP

提交回复
热议问题