You can connect to Amazon Redshift clusters from SQL client tools over Java Database Connectivity (JDBC) and Open Database Connectivity (ODBC) connections. Amazon Redshift doesn’t provide or install any SQL client tools or libraries. To use these tools or libraries to work with data in your clusters, install them on your client computer or Amazon EC2 instance. You can use most SQL client tools that support JDBC or ODBC drivers.
There are 2 main SQL client options available:
- Aginity workbench for Redshift
- Sql workbench
Here will use Aginity workbench to connect to the Redshift.
- Go to http://www.aginity.com/products/aginity-workbench/then clink on Amazon redshift (32bit/64bit) depending on your OS to download client software.
- Once you installed aginity client, Open the aginity client and click one Connect then select new to create connection as mentioned below
- Give the connection name then click ok.
- When you click on Ok you will see all the default values in connection details.
- You can find the all the connection details in Amazon redshift cluster as shown below.
- Click on ok after giving the connection details, sometimes you may get below error. This is due to Port is not opened in Security Groups.
- To open port go to AWS VPC> Select Security Groups> there you can see the all the Inbound and outbound rules.
- Goto> Inbound rules and select edit button to add port then select add another rule then select redshift as type as shown below.
- Provide the IP address of your machine where you have installed aginity then save. It means you are allowing only your IP address.
- Once save successful then go back to aginity and try to connect now.
- Once it is connected to Redshift you will see the following screen.
- You can execute SQL quires in right side pane.