pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Atul Kumar <akumar14871@gmail.com>
To: Postgres General <pgsql-general@postgresql.org>
Subject: Re: error on connecting port 5432
Date: Tue, 1 Dec 2020 06:26:52 -0800
Message-ID: <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com> (raw)
In-Reply-To: <CA+ONtZ5tGvDy+UJdiW=ZiWOLW9aJo9-hK1b6SHjGwr1r5sGUkg@mail.gmail.com>
References: <CA+ONtZ7KAKbePMZ08ifi=QvugZ+-XOK6mSwWkg1bgDm8gsmMFQ@mail.gmail.com>
	<CA+ONtZ5tGvDy+UJdiW=ZiWOLW9aJo9-hK1b6SHjGwr1r5sGUkg@mail.gmail.com>

On 12/1/20 12:51 AM, Atul Kumar wrote:
> Hi,
> 
> When I m creating a test db user using below command using root OS user
>   sudo -u postgres createuser -p 5432 --pwprompt testuser
> 
> I am getting the attached error of port.
> 
> But my postgres services are running fine on port 5432, I am sharing
> the screenshot of that also.

In future please include this as text not images.

> 
> So please help me in letting me know why I am getting the above error
> when I am connected to the root OS user?

You are not connecting as OS root you are connecting as the database 
user testuser.

Does /var/run/postgresql/.s.PGSQL.5432 exits?

Do you have more then one instance of Postgres on this machine?

If so how where they installed and more importantly where they installed 
differently?

As a test try running the command with addition of -h localhost.

> 
> Note - I am able to create a test db user when I am connected to
> postgres using psql command.
> 
> 
> Regards,
> Atul
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (12+ messages)  latest in thread

Message-ID: <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com>
Permalink:  ../2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com/
Also on:    postgresql.org/message-id/2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, akumar14871@gmail.com
  Subject: Re: error on connecting port 5432
  In-Reply-To: <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com>
  References: <CA+ONtZ7KAKbePMZ08ifi=QvugZ+-XOK6mSwWkg1bgDm8gsmMFQ@mail.gmail.com> <CA+ONtZ5tGvDy+UJdiW=ZiWOLW9aJo9-hK1b6SHjGwr1r5sGUkg@mail.gmail.com> <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox