Solved

First Database?

Posted on 2006-11-15
4
253 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now