MontyPython
MontyPython

Reputation: 2994

Unable to connect to Redshift from psql?

I am using the following command to log into my redshift cluster:

psql -h my-cluster.ho46wegweg423.ap-southeast-1.redshift.amazonaws.com -p 5439 -U username

This prompts me to enter password for username and I get the following error:

psql: FATAL: database "username" does not exist

I am able to log into the cluster from SQLWorkbench/J but not from command line.

Upvotes: 0

Views: 2089

Answers (1)

Jon Ekiz
Jon Ekiz

Reputation: 1022

You need to specify database name "-d my_database" after the hostname.

Upvotes: 2

Related Questions