CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  Creating Database Problem

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  Centox
      Centox
Re: Creating Database Problem
#4
Newbie
Joined: 2009/3/8
From
Posts: 2
HI Guys

I have solved the problem, pschaff thank you for your sugestion, I checked there but could not find the solution,

michaelnel

does the configuration file pg_hba.conf exist?

Is the postgresql server running?

Have you read any of the postgresql documentation?

michaelnel

Yes the pg_hba.conf exists, Yes the postgresql server running, Oh you beat I have read lots and lots of postgresql documentation, this finally got solved:

The bash config files got corrupted so I fixed them by copying the default over.

There were 2 bad entries in the /var/lib/pgsql/data/pg_hba.conf file. I commented them.

And that solved the problem, thank you guys for your help.
Posted on: 2009/3/10 5:59
Create PDF from Post Print
Top
  •  michaelnel
      michaelnel
Re: Creating Database Problem
#3
Professional Board Member
Joined: 2006/5/29
From San Francisco, CA
Posts: 1483
Just so we don't overlook the glaringly obvious.... does the configuration file pg_hba.conf exist? If not, how about creating one? Is the postgresql server running?

Have you read any of the postgresql documentation?
Posted on: 2009/3/9 21:57
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: Creating Database Problem
#2
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
I'm not a database guy so no direct suggestions; however, if help is not forthcoming here you might try posting to the centos-users list

http://lists.centos.org/mailman/listinfo/centos

Have seen quite a lot of postgresql threads there.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/3/9 20:44
Create PDF from Post Print
Top
  •  Centox
      Centox
Creating Database Problem
#1
Newbie
Joined: 2009/3/8
From
Posts: 2
Hi

I have installed in my Server Centos 5.2 postgresql and postgresql-server, but I have a problem when I want to create a database, this is the command I use:

su - postgres

But I dont get the user postgres loged in this is what I get:

-bash-3.2.$

The problem comes when I want to create the database with command: createdb "database name"

This is the output I get:

createdb: could not connect to database postgres: FATAL: missing or erroneous pg_hba.conf file

I am pretty new to Linux and working hard to get used to it, Now the question I have is should I have created the user " postgres " or this user is created

automatically when you install postgresql and postgresql-server ? I am a little confused now and really dont know what to do next in order to have this fix and

create the database I need, hope someone can help me out, thank you guys.
Posted on: 2009/3/8 5:50
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com