How to connect to localhost PostgreSQL on Mac using PSequel GUI?
localhost:3000
is the default url of webrick webserver. By default postgre SQL service connection is to localhost
on 5432
post.
$ cat /etc/services | grep postgrespostgres 5432/tcp # POSTGRESpostgres 5432/udp # POSTGRES
That is for unix
like systems. And I have postgres
server listening on 5432
port.
$ netstat -l --numeric-ports |grep 5432tcp 0 0 localhost.localdomain:5432 *:* unix 2 [ ACC ] STREAM LISTENING 11396 /tmp/.s.PGSQL.5432
So the fields will have the following default values:
Host/Socket
localhost
For test/development purposes most people use local server to connect to db.
Port
5432
That is just
postgres
server (not webserver) connection port. To validate just list and grep thepostgres
configuration file, like follows:# cat /var/lib/pgsql/data/postgresql.conf | grep port#port = 5432 # (change requires restart)
Here it is commented out, so default values are applied.
User
you are, but you must create the user role before connection as of the
postgres
user withcreateuser
orpsql
terminal utilities.Password
When you will create the user just leave password empty. So you be able then stay the field empty in the form.
Database
That is the database name. Create it with the command if needed.
You should enter below detail for configuration:
Host/Socket? - localhost
Port? - 5432
User? - DB user(My case its: postgres)
Password? - Password for above user
Database? - DB name of your project
You can see screenshot in this site: http://www.psequel.com/