pgsql on debian

Started by Jayalmost 22 years ago5 messagesgeneral
Jump to latest
#1Jay
jspothar@cs.uccs.edu

Hi group,
I am trying to get pgsql working on my debian system. I installed pgsql
using apt-get. but then i cant connect to it . i am using the following
command
psql -U jay -d jaydb

earlier i used create su postgres 'createdb root' jaydb.
but now i cannot access the db.
i get the follwing msgs

psql: FATAL: database "jaydb" does not exist

Any help would be greatly appreciated. I have a submission on mon. plz help
jay

#2Oliver Elphick
olly@lfix.co.uk
In reply to: Jay (#1)
Re: pgsql on debian

On Sun, 2004-06-27 at 00:36, Jay wrote:

Hi group,
I am trying to get pgsql working on my debian system. I installed pgsql
using apt-get. but then i cant connect to it . i am using the following
command
psql -U jay -d jaydb

earlier i used create su postgres 'createdb root' jaydb.

Sounds as if you created a database called 'root'.

but now i cannot access the db.
i get the follwing msgs

psql: FATAL: database "jaydb" does not exist

Use "psql -l" to list existing databases.

--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"Therefore being justified by faith, we have peace with
God through our Lord Jesus Christ." Romans 5:1

#3Jay
jspothar@cs.uccs.edu
In reply to: Oliver Elphick (#2)
Re: pgsql on debian

hi oliver
i tried the following command but nothing seems to work
psql -U root -d root
psql: FATAL: IDENT authentication failed for user "root"

any suggestions
thanks
jay

Oliver Elphick wrote:

Show quoted text

On Sun, 2004-06-27 at 00:36, Jay wrote:

Hi group,
I am trying to get pgsql working on my debian system. I installed pgsql
using apt-get. but then i cant connect to it . i am using the following
command
psql -U jay -d jaydb

earlier i used create su postgres 'createdb root' jaydb.

Sounds as if you created a database called 'root'.

but now i cannot access the db.
i get the follwing msgs

psql: FATAL: database "jaydb" does not exist

Use "psql -l" to list existing databases.

#4daniel
daniel@littlesaigon.homedns.org
In reply to: Jay (#3)
Re: pgsql on debian

1)from root su postgres
2)createuser the username
3)exit
4)su the user
5)createdb
psql the database

Jay wrote:

Show quoted text

hi oliver
i tried the following command but nothing seems to work
psql -U root -d root
psql: FATAL: IDENT authentication failed for user "root"

any suggestions
thanks
jay

Oliver Elphick wrote:

On Sun, 2004-06-27 at 00:36, Jay wrote:

Hi group,
I am trying to get pgsql working on my debian system. I installed
pgsql using apt-get. but then i cant connect to it . i am using the
following command
psql -U jay -d jaydb

earlier i used create su postgres 'createdb root' jaydb.

Sounds as if you created a database called 'root'.

but now i cannot access the db.
i get the follwing msgs

psql: FATAL: database "jaydb" does not exist

Use "psql -l" to list existing databases.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jay (#3)
Re: pgsql on debian

Jay <jspothar@cs.uccs.edu> writes:

i tried the following command but nothing seems to work
psql -U root -d root
psql: FATAL: IDENT authentication failed for user "root"

You basically cannot use the -U switch when using IDENT authorization;
that auth mode requires that your presented Postgres username be the
same as the Unix name you're logged in under. (If you don't like
this then change to a different auth mode; see pg_hba.conf.)

In any case, root is unlikely to be the name of the postgres superuser.
When you probably want to do is "su" to become postgres and then psql
without using -U.

regards, tom lane