aws-samples / aws-refarch-wordpress

This reference architecture provides best practices and a set of YAML CloudFormation templates for deploying WordPress on AWS.
MIT No Attribution
1.08k stars 601 forks source link

How to Connect to Aurora RDS MySQL Database with DataGrip #17

Open jimmyjuarez opened 6 years ago

jimmyjuarez commented 6 years ago

I'm having trouble connecting to the MySQL database with JetBrains DataGrip, here are the "Data Source Properties":

GENERAL Host: (My Cluster Endpoint) Port: 3306 Database: (My Database Name) User: (My Database Username) Password: (My Database Password) URL: (My Cluster Endpoint):3306/(My Database Name)

general

SSH/SSL Use SSH Tunnel: FALSE Proxy Host: Undefined Proxy User: Undefined Auth Type: Undefined Proxy Password: Undefined

Use SSL: TRUE CA File: Undefined Client Certificate File: Undefined Client Key File: (My_Security_Group_PEM_File.pem)

ssh-ssl

I can't figure out what I'm doing wrong here, please help.

RGuilfoyle commented 6 years ago

Jimmy, I expect you are connecting remotely, from your own PC or Mac. The default Firewall rules will not allow Database access directly from the internet (this is almost never wise). However, the tool you are using appears to have SSH tunnel support. You should be able to use a Bastion host to reach the database. Try; Use SSH Tunnel: True Proxy Host: Bastion Host/ Public IP Proxy User: ec2-user Auth Type: SSH Key Proxy Key: My_Security_Group_PEM_File.pem (assuming this allows access to the Bastion) Don't use SSL as this is Client certificate authentication, which is not used in this case. For the database itself you should use password access, with the database username and password you chose when launching the templates.