Amazon Redshift
Cluster Management Guide (API Version 2012-12-01)

Connect to Your Cluster by Using SQL Workbench/J

Amazon Redshift does not provide or install any SQL client tools or libraries, so you must install any that you want to use with your clusters. If you already have a business intelligence application or any other application that can connect to your clusters using a standard PostgreSQL JDBC or ODBC driver, then you can skip this section. If you don't already have an application that can connect to your cluster, this section presents one option for doing so using SQL Workbench/J, a free, DBMS-independent, cross-platform SQL query tool.

Install SQL Workbench/J

The Amazon Redshift Getting Started uses SQL Workbench/J. In this section, we explain in detail how to connect to your cluster by using SQL Workbench/J.

To install SQL Workbench/J

  1. Review the SQL Workbench/J software license.

  2. Go to the SQL Workbench/J website and download the appropriate package for your operating system on your client computer or Amazon EC2 instance.

  3. Go to the Installing and starting SQL Workbench/J page. Follow the instructions for installing SQL Workbench/J on your system.


    SQL Workbench/J requires the Java Runtime Environment (JRE) be installed on your system. Ensure you are using the correct version of the JRE required by the SQL Workbench/J client. To determine which version of the Java Runtime Environment is running on your system, do one of the following:

    • Mac: In the System Preferences, click the Java icon.

    • Windows: In the Control Panel, click the Java icon.

    • Any system: In a command shell, type java -version. You can also visit, click the Do I Have Java? link, and click on the Verify Java button.

    For information about installing and configuring the Java Runtime Environment, go to

Connect to Your Cluster over a JDBC Connection in SQL Workbench/J


Before you perform the steps in this procedure, make sure that your client computer or Amazon EC2 instance has the recommended Amazon Redshift JDBC driver. For links to download the latest drivers, see Download the Amazon Redshift JDBC Driver. Also, make sure you have configured firewall settings to allow access to your cluster. For more information, see Step 4: Authorize Access to the Cluster.

To use a JDBC connection in SQL Workbench/J

  1. Open SQL Workbench/J.

  2. Click File, and then click Connect window.

  3. Click Create a new connection profile.

  4. In the New profile box, type a name for the profile. For example, examplecluster_jdbc.

  5. Click Manage Drivers. The Manage Drivers dialog opens. In the Name box, type a name for the driver.

    Click the folder icon next to the Library box, navigate to the location of the driver, click it, and then click Open.

    If the Please select one driver dialog box displays, select or and click OK. SQL Workbench/J automatically completes the Classname box. Leave the Sample URL box blank, and then click OK.

  6. In the Driver box, select the driver you just added.

  7. In URL, copy the JDBC URL from the Amazon Redshift console and paste it here.

    For more information about finding the JDBC URL, see Configure a JDBC Connection.

  8. In Username, type the name of the master user.

    If you are following the Amazon Redshift Getting Started, type masteruser.

  9. In Password, type the password associated with the master user account.

  10. Select the Autocommit box.

  11. Click the Save profile list icon, as shown below:

  12. Click OK.

Test the SQL Workbench/J Connection

After you configure your JDBC or ODBC connection, you can test the connection by running an example query.

  1. You can use the following query to test your connection.

    select * from information_schema.tables;

    If your connection is successful, a listing of records appears in the Results tab.

  2. Alternatively, if you loaded the sample tables and data from the Amazon Redshift Getting Started, you can test your connection by typing the following query into the Statement window:

    select * from users order by userid limit 100;

    If your connection is successful, a listing of records appears in the Results tab.