Postgresql installation

Hi all,

I want to install two postgreql 8.3.5 instances on same servers. already one instalce is running on default port and i need it to be installed on another port.. How ever i achived installing the second instance.. but the problem is if i create a new user using createuser in the newly installed postgresql it creates in the old directroy

old installation runs on 5432 port

netstat -an |grep -i 5432
127.0.0.1.5432             *.*                0      0 49152      0 LISTEN
ffffffff988ed588 stream-ord fffffe82cf827b00 0000000 /tmp/.s.PGSQL.5432

 
/me/apps/em/postgresql/data/global/vi pg_auth
"pg_auth" 1 line, 17 characters
"em" "" ""
"fish" "" ""
"jhon" "md57c81a4a00cc" ""
"postgres" "md53d6c803" ""

And if i give the full path of the newly installed postgres it gives the below error.. ( new postgres runs on socket 5434

netstat -an |grep -i 5434
127.0.0.1.5434             *.*                0      0 49152      0 LISTEN
ffffffff988ed588 stream-ord fffffe82cfb1ac40 0000000 /tmp/.s.PGSQL.5434

/me/apps/em/database/bin$ /me/apps/em/database/bin/createuser fish
Shall the new role be a superuser? (y/n) y
createuser: could not connect to database postgres: 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"?

Any idea what am doing wrong?

Did you set PGPORT before, or pass the port (-p 5434) into the createuser command?

Hi Scott, thanks for the fast reply.. it worked!!! can you als0 help me to create a database ( in new postgres installation)user and password for that db... I am very new to database.. thanks in advance..:slight_smile:

I would recommend installing phpPgAdmin on one of the servers (assuming all the servers are on the same network) and using that to create your databases. It's very nice!

As for creating a database manually, there is no shortage of documentation out there. Just Google for it.

1 Like