LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-29-2006, 02:22 AM   #1
veeramani
Member
 
Registered: Apr 2006
Posts: 33

Rep: Reputation: 15
unable to login to postgresql


when i try to login to postgresql using
psql -h 127.0.0.1 -p 5432 -U user -W database_db

it gives an error database_db not found.

BUT am sure username/passwd/database are correct and exists.
where is the key to open this dead lock????
waiting for your keys...
 
Old 11-29-2006, 02:42 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 9,920

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
The correct syntax would be
psql -h hostname -p port -U user -d database

By default psql assumes localhost and the default port (5432) so this will work.
psql -U user database

If your database username is the same as your linux username then all you need is:
psql database

See psql man pages for additional details and well as postgresql documentation. BTW what linux distribution / version are you running and was postgresql installed with the OS or from source.
 
Old 11-29-2006, 02:42 AM   #3
gruby12
LQ Newbie
 
Registered: Aug 2005
Location: Poland
Distribution: SUSE 10.1, Mandriva 2008.1
Posts: 26

Rep: Reputation: 15
Try psql -h 127.0.0.1 -p 5432 -U user database_db
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to login as user; can login as root. rksanders Debian 24 02-09-2011 08:01 AM
Unable to connect To Database...PostgreSQL and PHP Manashi Programming 8 04-05-2006 06:57 AM
login and postgresql problem after installing openldap robertngo Linux - Software 1 07-18-2005 07:47 PM
unable to login due to login expiry niiha Programming 2 09-02-2004 10:50 AM
Embedded SQL -Unable to connect to PostgreSQL database vikram_cvk Linux - Software 1 05-30-2004 06:14 AM


All times are GMT -5. The time now is 05:39 AM.

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
Open Source Consulting | Domain Registration