Solved

First Database?

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

7 Experts available now in Live!

Get 1:1 Help Now