LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 03-19-2012, 11:57 PM   #1
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 122

Rep: Reputation: 15
psql FATAL: role "postgres" does not exist error


hello,


I've installed postgresql 8.4 on my freebsd 8.2 machine and am having some trouble running the db.

I have been able to run /usr/local/etc/rc.d/postgresql initdb with success and then start the database with /usr/local/etc/rc.d/postgresql start


But when I su - postgres and run the psql command this is what I get:
Code:
[postgres@LBSD2 /usr/home/postgres]$ psql
psql: FATAL:  role "postgres" does not exist
I have found some advice online about how to handle this but no luck with any of that advice so far.

So far I have tried:
Code:
[postgres@LBSD2 /usr/home/postgres]$ psql -d postgres
psql: FATAL:  role "postgres" does not exist
but as you can see I get the same result. I would appreciate any advice you may have on this.

thanks!

Last edited by bluethundr; 03-19-2012 at 11:58 PM. Reason: wrong command shown
 
Old 03-20-2012, 01:32 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
I know little about *BSD, and/or how postgres gets installed under these.

Did you install from source, is there a BSD package? If it's the latter,
does it come with a "distro" specific README? It does for most Linux'
flavours I've used postgres with.

Moving this to "other *nix".


Cheers,
Tink
 
Old 03-20-2012, 07:34 AM   #3
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 122

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Tinkster View Post
I know little about *BSD, and/or how postgres gets installed under these.

Did you install from source, is there a BSD package? If it's the latter,
does it come with a "distro" specific README? It does for most Linux'
flavours I've used postgres with.

Moving this to "other *nix".


Cheers,
Tink

OK thanks. Yes I used a FreeBSD ports package. I now see that there is a FreeBSD forum here on linuxQ! Sorry for posting in the wrong category.
 
Old 03-20-2012, 12:35 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
No worries ... did you find any document that comes with the ports package
regarding installing postgres the BSD way?

If not: as which user did you do the initdb?
The "traditional" way (built from source, and the way I use
postgres on Slackware) does this:
Code:
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
In other words, you're asked to create the user account first, and
then run initdb as that postgres user.



Cheers,
Tink
 
  


Reply

Tags
freebsd, postgres, postgresql


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovery from tar backup error occurred "error exist delayed from previous errr" rakesh_sni Linux - Software 2 08-29-2009 07:56 AM
FATAL error: "Thermal" and "Fan" ibex Linux - Hardware 1 06-22-2006 07:31 AM
psql: FATAL: IDENT authentication failed for user "manashi" Manashi Programming 2 03-16-2006 03:17 AM
Postgresql error FATAL: user "root" does not exist" cgetty Ubuntu 4 06-21-2005 03:11 PM
psql: FATAL 1: IDENT authentication failed for user "postgres" linuxtesting2 Linux - General 3 06-16-2004 01:48 PM


All times are GMT -5. The time now is 07:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration