title: How to connect Amazon Redshift to python
body: <p>This is my python code and I want to connect my Amazon Redshift database to Python, but it is showing error in host.</p>
  
  <p>Can anyone tell me the correct syntax? Am I passing all the parameters correctly?</p>
  
  <pre><code>con=psycopg2.connect("dbname = pg_table_def, host=redshifttest-icp.cooqucvshoum.us-west-2.redshift.amazonaws.com, port= 5439, user=me, password= secret")
  </code></pre>
  
  <p>This is the error:  </p>
  
  <blockquote>
    <p>OperationalError: could not translate host name "redshift://redshifttest-xyz.cooqucvshoum.us-west-2.redshift.amazonaws.com," to address: Unknown host</p>
  </blockquote>