From: | John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com> |
---|---|
To: | Agnar Renolen <agnar(dot)renolen(at)gmail(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Getting started with first user. |
Date: | 2018-01-09 16:17:41 |
Message-ID: | CAAJSdjj-G+=x6PZ5Wutp_TbykjEWaUpMj75EN4tsurOk5GENug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jan 9, 2018 at 3:48 AM, Agnar Renolen <agnar(dot)renolen(at)gmail(dot)com>
wrote:
> I have just installed PostGIS (Postgres9.6) on a Debian server using
> apt-get.
>
> But I have problems doing anything:
>
> I installed as root, but trying doing things as my local user "me"
>
> me> createuser me
> createuser: could not connect to database postgres: FATAL: role "me" does
> not exist
>
> Then, trying the same as root, but gettinge the same result.
>
> root> createuser me
> createuser: could not connect to database postgres: FATAL: role "root"
> does not exist
>
> Then trying with the -U postgres option.
>
> root> createuser -U postgres me
> createuser: could not connect to database postgres: FATAL: Peer
> authentication failed for user "postgres"
>
> How do I get started?
>
It's been a long time for me, but as I recall, I did something like:
me$ sudo su - # change to root
root# su - postgres # change to postgres user
postgres$ createuser -s me #create "me"
postgres$ exit # go back to root
root# exit # go back to me
me$ createdb me # create my default database
In /var/lib/pgsql/data/pg_hba.conf , I have lines like:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
--
I have a theory that it's impossible to prove anything, but I can't prove
it.
Maranatha! <><
John McKown
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-01-09 16:23:57 | Re: RES: help with generation_series in pg10 |
Previous Message | Márcio A. Sepp | 2018-01-09 16:14:46 | RES: help with generation_series in pg10 |