You can set your DB Security Group to allow access from specific 'EC2 Security Groups' or 'CIDR IP ranges'.
Visit this URL to explore more:
Well, You have already mentioned that, you allowed access to 'EC2 Security Group'. Refer above URL and make sure that you did it correctly.
If it didn't help, then try to give access to the CIDR IP range (Above URL will help you for that too).