How to connect to localhost PostgreSQL on Mac using PSequel GUI? How to connect to localhost PostgreSQL on Mac using PSequel GUI? database database

How to connect to localhost PostgreSQL on Mac using PSequel GUI?


localhost:3000 is the default url of 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:

  1. Host/Socket

    localhost

    For test/development purposes most people use local server to connect to db.

  2. Port

    5432

    That is just postgres server (not webserver) connection port. To validate just list and grep the postgres 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.

  3. User

    you are, but you must create the user role before connection as of the postgres user with createuser or psql terminal utilities.

  4. Password

    When you will create the user just leave password empty. So you be able then stay the field empty in the form.

  5. 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 this screenshot in this site: http://www.psequel.com/