AWS: can't connect to RDS database from my machine

后端 未结 7 1519
野的像风
野的像风 2021-01-30 10:10

The EC2 instance/live web can connect just fine to the RDS database. But when I want to debug the code in my local machine, I can\'t connect to the database and got this error:<

7条回答
  •  野的像风
    2021-01-30 11:07

    It turns out it is not that hard. Do these steps:

    1. Go to EC2 Dashboard
    2. Go to Security Groups tab
    3. Select and only select the RDS database security group. You'll see the security group detail at the bottom
    4. Click Inbound tab
    5. Click Edit button
    6. Add Type:MYSQL/Aurora;Protocol:TCP;Range:3306;Source:0.0.0.0/0

提交回复
热议问题