This step-by-step guide will show you how to connect your MySQL database on Amazon RDS to QueryTree.
1. Log into your Amazon Web Services account and navigate to the RDS page. Here you'll see the RDS dashboard. Go to the Instances tab, where you will see a list of your instances:
2. Select the database you wish to connect to and sign in to your QueryTree account. Once logged in, on the My Databases page, click Create New:
3. You will be taken to the Create New Database Connection page. Enter a Name and Description for your connection. This is only used when displaying the connection within QueryTree. The Type should be left as My SQL:
4. You then need go back to your instance in the Amazon RDS Console to obtain the information for the Server field on QueryTree. Expand your selected database instance and you will see the Endpoint value. This needs to be copied and pasted into QueryTree:
This value goes into the Server field in QueryTree:
The Port value can be left as the default.
Leave the Use SSH tick box in QueryTree un-ticked. Your connection to Amazon RDS will be encrypted because QueryTree uses SSL whenever a certificate is installed on the server (SSL Mode is set to 'Preferred') and Amazon installs SSL certificates on its MySQL instances. It is possible to set up an SSH tunnel into your AWS VPC via an EC2 instance. But that is beyond the scope of this guide.
6. The Username and Password fields in QueryTree should be populated with a valid MySQL database user login. If you need to create a new database user, you can read our guide here.
The value to use for QueryTree's Database Name field can be found in the Configuration Details section of the instance details in the RDS console.
7. Finally, you need to allow QueryTree's servers access to your database. To do this, click on the Services tab in the menu bar on your Amazon AWS console and go to EC2. In the left hand menu select Security Groups and then click on the security group you are using for your RDS instance. You then need to go to the Inbound tab and add rules to allow QueryTree's IP addresses. The result should look like this:
Once you have filled in all of the fields needed to create your database connection, you can then click on Test this Connection in QueryTree. If connection is successful, hit Create to save your database connection.