Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot connect to database thorugh psql

Status
Not open for further replies.

parthaC

Programmer
Nov 18, 2002
6
0
0
IN
I have created a new database in my system through the initdb command. When I issue pg_ctl start the postmaster is starting properly. However when I am issuing the command
psql dbname
the system is saying
"the database name does not exist in the system catalogue."
Even when I am the postgres super user I still cannot connect to the system database bundled with the distribution of Mandrake 9. Please help
OS -- Mandrake 9
database -- postgreSQl
CPU -- Pentium 4
Thanks and regards
Partha Sarathi Chakraborty
 
You need to use the 'createdb' command to create a new database. Initdb is for setting up a new complete PostgreSQL system.
Code:
createdb mydatabase

psql mydatabase

Rebmember, 'createdb' must be performed as a user with rights to run PostgreSQL itself. Usually that is the 'postgres' user on a system. -------------------------------------------

Big Brother: "War is Peace" -- Big Business: "Trust is Suspicion"
(
 
Actually I want to start a whole new database system whose priviledged user should not be postgres. Please mention the steps to perform.
If I have to go for a createdb command by postgres do I have to mention a seperate port number.Thanks and regards
Partha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top