Solved

First Database?

Posted on 2006-11-15
4
260 Views
Last Modified: 2012-06-27
Hey all,

I've been developing Access/ASP apps for awhile and finally got around to building a Linux box.  I'm planning to use Postgres/PHP apps from here on in but... I can't seem to figure out Postgres.  I'm running FC5 with what I think are the appropriate postgres packages installed.  There's no Graphical interface I can find.  If there isn't a graphical interface, that's fine, but I have no idea what commands I'm supposed to be using.  I've tried a using psql from the terminal to no avail (I get "psql: FATAL: role "user" does not exist").

My goal (for now) is to get one database running to where PHP can access it.  What am I missing?
0
Comment
Question by:netsmithcentral
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:ivanovn
ID: 17956828
I don't know much about FC5 but you might be able to run the web based phpPgAdmin graphical interface. For more info check http://phppgadmin.sourceforge.net/.

What is the psql command you executed? It seems like you used "user" as the username and that username does not exist in the database. Try something like:
psql -h host_name -p 5432 -d db_name -U user_name

Make sure you have you edit your pg_hba.conf to accept the proper connections. Make sure the postmaster is running.
0
 
LVL 22

Accepted Solution

by:
earth man2 earned 200 total points
ID: 17961869
login as root
passwd postgres
enter new password for user postgres: YOURNEWPASSWORD

login as postgres
type
initdb
pg_ctl -l /tmp/pg.log start
createdb YOURNEWDBNAME
psql YOURNEWDBNAME
create user YOURUSERNAME identified by 'YOURPOSTGRESQLPASSWD';

0
 
LVL 22

Expert Comment

by:earth man2
ID: 17961911
that last line is Oracle syntax... use instead
create user YOURUSERNAME password 'YOURPOSTGRESQLPASSWD';
0
 
LVL 3

Expert Comment

by:Ghitza
ID: 18064753
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question