Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSJda-0001J7-Vp for pgsql-admin@arkaria.postgresql.org; Sun, 28 Aug 2022 14:51:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oSJdZ-00047f-S8 for pgsql-admin@arkaria.postgresql.org; Sun, 28 Aug 2022 14:51:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oS0sr-0002bb-Sx for pgsql-admin@lists.postgresql.org; Sat, 27 Aug 2022 18:50:17 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oS0so-0000D2-Mz for pgsql-admin@lists.postgresql.org; Sat, 27 Aug 2022 18:50:17 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 2E73E63066; Sat, 27 Aug 2022 18:50:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s3EqEilc2J3U; Sat, 27 Aug 2022 18:50:11 +0000 (UTC) Received: from smtpclient.apple (unknown [4.28.96.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id C215F6304A; Sat, 27 Aug 2022 18:50:11 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: could not connect to server, in order to operate pgAdmin/PostgreSQL via python From: Scott Ribe In-Reply-To: Date: Sat, 27 Aug 2022 12:50:10 -0600 Cc: pgsql-admin@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <7B892B75-175A-4A1A-897E-5A7671E594BE@killerbytes.com> References: To: Alex Christian X-Mailer: Apple Mail (2.3696.120.41.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Are you actually running PG on port 5433 instead of 5432? Is PG actually listening on 127.0.0.1 (or *)? -- Scott Ribe scott_ribe@elevated-dev.com https://www.linkedin.com/in/scottribe/ > On Aug 27, 2022, at 11:02 AM, Alex Christian = wrote: >=20 > Hello,=20 >=20 > I am trying to connect to postgresql using python on windows, but it = throws an error message. Below I am sharing the code and error. Can you = please help me out on this issue?=20 > Thank you >=20 > <2.png><1.png>