By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,676 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

Cannot create database

P: n/a
First i want to say that i just subscribed to this mailing list and this
is my first post. :)

im new to postgresql and i installed it recently on linux redhat 9
system following the instructions from administrators tutorial.

then i attempted to create "my first database" following the
instructions from tutorial, but i get this message:

[root@localhost root]# createdb mydb
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
createdb: database creation failed

can someone help me? whats wrong? i am logged in as root, just started
learning postgresql...
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Have you started the database server (postmaster)??

Try in the bin directory looking for pg_ctl bin and issuing pg_ctl start.

This will start the db server (postmaster) then you should be able to
issue the createdb command

HTH
Darren

On 5 Oct 2003, Domagoj Cajic wrote:
First i want to say that i just subscribed to this mailing list and this
is my first post. :)

im new to postgresql and i installed it recently on linux redhat 9
system following the instructions from administrators tutorial.

then i attempted to create "my first database" following the
instructions from tutorial, but i get this message:

[root@localhost root]# createdb mydb
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
createdb: database creation failed

can someone help me? whats wrong? i am logged in as root, just started
learning postgresql...
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)


--
Darren Ferguson
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #2

P: n/a
Domagoj Cajic writes:
then i attempted to create "my first database" following the
instructions from tutorial, but i get this message:

[root@localhost root]# createdb mydb
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
createdb: database creation failed


You did not start the database server.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #3

P: n/a
On 5 Oct 2003, Domagoj Cajic wrote:
First i want to say that i just subscribed to this mailing list and this
is my first post. :)

im new to postgresql and i installed it recently on linux redhat 9
system following the instructions from administrators tutorial.

then i attempted to create "my first database" following the
instructions from tutorial, but i get this message:

[root@localhost root]# createdb mydb
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
createdb: database creation failed

can someone help me? whats wrong? i am logged in as root, just started
learning postgresql...


I'm not sure which instructions you've followed. Somewhere along the
line, the instructions should have included creating a superuser account
named postgresq, or something similar, setting the $PGDATA env var,
running initdb, then running pg_ctl start.

Or did you install from .rpm files?

Either way, you should not be interfacing with the database as root (or
doing anything else you don't NEED to be root to do.) It's a bad habit to
be root when you don't need to be on a unix box.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.