Postgresql & psycopg2: database does not exist
问题 I am trying to establish a connection to a database like this: psycopg2.connect(database="movies", user="lfcj", host="127.0.0.1"); my pg_hba.conf file has a line: TYPE __ DATABASE___USER__ADDRESS___METHOD local all lfcj peer I am trying to use peer identification, and my SO user name is also lfcj . When I log in postgresql like this, grant all privileges to lfcj , and run \list : psql lfcj -h 127.0.0.1 -d movies Enter password: 'myPassword' psql (9.4.1) SSL connection (protocol: TLSv1.2,