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

后端 未结 7 1517
野的像风
野的像风 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:03

    Just burned two hours going through the great solutions on this page. Time for the stupid answer!

    I redid my Security Groups, VPC's, Routing Tables, Subnets, Gateways... NOPE. I copy-pasted the URL from the AWS Console, which in some cases results in a hidden trailing space. The endpoint is in a

    element, which the browser gives a \n when copying. Pasting this into the Intellij db connector coerces it to a space.

    I only noticed the problem after pasting the URL into a quote string in my source code.

提交回复
热议问题