dbTalk Databases Forums  

Newbie to PostgreSQL 8.3 on Ubuntu 9.04: psql fails authentication

comp.databases.postgresql comp.databases.postgresql


Discuss Newbie to PostgreSQL 8.3 on Ubuntu 9.04: psql fails authentication in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rasputin Paskudniak
 
Posts: n/a

Default Newbie to PostgreSQL 8.3 on Ubuntu 9.04: psql fails authentication - 08-25-2009 , 12:36 AM






Greetings, new friends.

I have just started trying to get my feet wet with PostgreSQL on my
Ubuntu Linux host. May this be my greatest hurdle. I am trying to learn
it with the help of the book "Beginning Databases with PostgreSQL" by
Stones & Mathew. Unfortunately, the book is oriented to release 7.4 and
I am using 8.3. I don't know how out of date this may be.

Also note: I am no newbie to databases, with expertise in Informix and
knowledge of Oracle.

The data area is in a ~10GB file system in directory /pg/data. Thus, I
initialized the data area with the command:
$ initdb /pg/data
which seems to have started the postmaster process as well.

I have left all conf files alone.

Now I try to start a SQL session as user jake:
$ psql
psql: FATAL: Ident authentication failed for user "jake"

OK, what am I missing?

BTW, at the book's advice, I then added this line to pg_hba.conf:
host all 192.168.0.0 255.255.0.0

This did not help at all (I was skeptical anyway because this is a local
connection) so I have removed it.

Is there a Postgres package I still need to install?

Thanks much for advice here.

-- Rasputin Pasudniak

Reply With Quote
  #2  
Old   
Rasputin Paskudniak
 
Posts: n/a

Default Re: Newbie to PostgreSQL 8.3 on Ubuntu 9.04: psql fails authentication - 08-25-2009 , 01:13 AM






Not one to let a question linger with no action, I have tried the
following as user postgres:

1. $ psql
2. postgres=# create user jake;
CREATE ROLE
3. postgres=# create database MusicTitles with owner = jake ;
CREATE DATABASE

Then, as user jake, in another shell window, I tried to connect:
$ psql MusicTitles
psql: FATAL: database "MusicTitles" does not exist

Again, what essential step have I missed?

ZZZzzzz... OK, I'll call it a night, with a shout-out to Obnoxio the
Clown, a friend from C.D.I.

-- Rasputin


Rasputin Paskudniak wrote:
Quote:
Greetings, new friends.

I have just started trying to get my feet wet with PostgreSQL on my
Ubuntu Linux host. May this be my greatest hurdle. I am trying to learn
it with the help of the book "Beginning Databases with PostgreSQL" by
Stones & Mathew. Unfortunately, the book is oriented to release 7.4 and
I am using 8.3. I don't know how out of date this may be.

Also note: I am no newbie to databases, with expertise in Informix and
knowledge of Oracle.

The data area is in a ~10GB file system in directory /pg/data. Thus, I
initialized the data area with the command:
$ initdb /pg/data
which seems to have started the postmaster process as well.

I have left all conf files alone.

Now I try to start a SQL session as user jake:
$ psql
psql: FATAL: Ident authentication failed for user "jake"

OK, what am I missing?

BTW, at the book's advice, I then added this line to pg_hba.conf:
host all 192.168.0.0 255.255.0.0

This did not help at all (I was skeptical anyway because this is a local
connection) so I have removed it.

Is there a Postgres package I still need to install?

Thanks much for advice here.

-- Rasputin Pasudniak

Reply With Quote
  #3  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Newbie to PostgreSQL 8.3 on Ubuntu 9.04: psql fails authentication - 08-25-2009 , 03:44 AM



Rasputin Paskudniak <rpaskudniak (AT) yahoo (DOT) com> wrote:
Quote:
Not one to let a question linger with no action, I have tried the
following as user postgres:

1. $ psql
2. postgres=# create user jake;
CREATE ROLE
3. postgres=# create database MusicTitles with owner = jake ;
CREATE DATABASE
You have now a database called 'musictitles', with lower letters.
If you want to create the database with upper-case user:

create database "MusicTitles" ...


Quote:
Then, as user jake, in another shell window, I tried to connect:
$ psql MusicTitles
psql: FATAL: database "MusicTitles" does not exist
psql musictitles


Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net

Reply With Quote
  #4  
Old   
Rasputin Paskudniak
 
Posts: n/a

Default Re: Newbie to PostgreSQL 8.3 on Ubuntu 9.04: psql fails authentication - 08-25-2009 , 05:39 AM



Andreas Kretschmer wrote:
Quote:
Rasputin Paskudniak <rpaskudniak (AT) yahoo (DOT) com> wrote:
Not one to let a question linger with no action, I have tried the
following as user postgres:

1. $ psql
2. postgres=# create user jake;
CREATE ROLE
3. postgres=# create database MusicTitles with owner = jake ;
CREATE DATABASE

You have now a database called 'musictitles', with lower letters.
If you want to create the database with upper-case user:

create database "MusicTitles" ...


Then, as user jake, in another shell window, I tried to connect:
$ psql MusicTitles
psql: FATAL: database "MusicTitles" does not exist

psql musictitles


Andreas
Andreas,
Thanks much! That was it. I'm so glad it was something obvious that I
had overlooked. I'll let the database name stay "musictitles".

Now if you will please help me find my nose, I'll be all set ond on my
way. ;-D

-- Rasputin

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.