From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Atul Kumar <akumar14871(at)gmail(dot)com> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: error on connecting port 5432 |
Date: | 2020-12-01 18:15:40 |
Message-ID: | 5d492dca-0f70-1715-03bc-6c9ded5ea48b@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 12/1/20 8:10 AM, Atul Kumar wrote:
> Hi,
>
> Just to clarify that I am at root OS user, trying to create a test user
> using postgres user(-u) with create user command.
No you are not at root for the OS you are at OS user postgres connecting
as database user testuser.
>
> Error screenshots are already shared with you.
What I was saying is that the error message as text is better. You can
copy and paste from a terminal session.
You have not answered the other questions about the status of your
Postgres install(s). The suspicion is that you have a mixed install and
are having PATH issues. See Tom's response also.
>
> Please re-check the same.
>
>
>
>
>
> Regards
> Atul
>
>
>
> On Tuesday, December 1, 2020, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> 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(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Atul Kumar | 2020-12-02 06:03:17 | Re: error on connecting port 5432 |
Previous Message | Tom Lane | 2020-12-01 16:53:55 | Re: error on connecting port 5432 |