title: how can I connect to a postgresql database from external psycopg2.connect?
body: <p>I would like to connect to a postgresql database using python from  a different server. <br/>
  I triyed this :</p>
  
  <pre><code>conn_string = "host=192.168.1.1 dbname='"+db7+"' user='user' password='"+pw7+"'"
  conn = psycopg2.connect(conn_string)
  cursor = conn.cursor()
  </code></pre>
  
  <p>but I get the error:</p>
  
  <pre><code>    conn = psycopg2.connect(conn_string)
    File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
      connection_factory=connection_factory, async=async)
  psycopg2.OperationalError: FATAL:  database "database" does not exist
  </code></pre>