This article covers how you can connect TeamSQL to your Amazon Redshift database servers, as well as how you can connect using SSL.
NOTE: You can connect to AWS Redshift with TeamSQL, a multi-platform DB client that works with Redshift, PostgreSQL, MySQL & Microsoft SQL Server and runs on Mac, Linux and Windows.
You can download TeamSQL Beta for free:
In the Explorer pane, click on the plus icon next to CONNECTIONS.
This launches the Add Connection window where you can create new connections from TeamSQL to your server(s).
To create a connection to an Amazon Redshift database, set the Database Type to AWS Redshift.
Note how the window now displays Create a new Amazon Redshift connection at the top.
To connect to your AWS Redshift database server, you’ll need to provide the following parameters to TeamSQL:
Connection Name: A descriptive name for your connection
Host: The host address TeamSQL will use to access your AWS Redshift server
Port: The port through which TeamSQL uses to communicate with your AWS Redshift server
User Name: The user name TeamSQL uses to log in and gain access to your AWS Redshift server
Password: The password that accompanies the user name TeamSQL uses to log in and gain access to your AWS Redshift server
Default Database: The database within your AWS Redshift server you want TeamSQL to consider your default
A flag indicating whether the AWS Redshift server is a production instance or not
The flag indicating whether TeamSQL should enable an SSH tunnel through which it connects to your server
Connecting Through an SSH Tunnel
TeamSQL allows you to connect to your server via SSH Tunnel. If you’ve enabled this option for your connection, you’ll be prompted to provide the following credentials:
Host: The host address TeamSQL uses to access the server you’ll use to connect to the AWS Redshift server
Port: The port on the server connecting to your AWS Redshift server that you want to use for communications
Username: The username you use to log in to the server you use to connect to your AWS Redshift server
Password: The passport you use to log in to the server you use to connect to your AWS Redshift server
Private Key File: A file containing a private key you use to log in to the server you use to connect to your AWS Redshift server
For authentication purposes, you can use either:
- Your username and password, or;
- Your user name and a private key.
Enabling SSL Connections
When creating an AWS Redshift connection, you can opt to connect via SSL:
To support SSL connections, Amazon Redshift creates and installs a self-signed SSL certificate on each cluster. The public key is stored at https://s3.amazonaws.com/redshift-downloads/redshift-ssl-ca-cert.pem.
Please note that this only provides an encrypted connection to your database servers; you should not rely on this for authenticating the server. If you need to authenticate the server, install the SSL certificate’s public key on your client and use it to connect to your Redshift clusters.
You’ll need to provide the following to enable SSL connections to your Redshift clusters:
Reject Unauthorized: If this flag is set to no, and both of the following are true, TeamSQL will allow the connection:
- The user has not uploaded an SSL certificate
- The server accepts SSL connections without requiring a certificate
By default, Redshift cluster databases accept connections regardless of whether it uses SSL or not. You can change this by setting the require_SSL parameter parameter to true in the parameter group associated with a given cluster. See Modifying a Parameter Group for additional information.
Client Certificate: If you’re using a Client Certificate with your SSL connection, upload it here.
Client Key: If you’re using a Client Key with your SSL connection, upload it here.
Root Certificate: If you’re using a Root Certificate with your SSL connection, upload it here.
Once you’ve provided the appropriate parameters, you can click Test Connection to see if the details you’ve provided TeamSQL are correct. If they are, click Save Connection.
You will now see your newly-created connection in your Explorer panel. By default, TeamSQL creates connections in a disabled state. Click on the socketicon to enable the connection.
Once connected, you’ll see a green checkmark next to your connection’s name, as well as a drop-down list of the databases available on your server.