Solved

First Database?

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

632 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