Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

First Database?

Posted on 2006-11-15
4
Medium Priority
?
265 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 800 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

886 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