Error connecting to PostgreSQL by pgAdmin 4

1

I installed pgAdmin 4 on my note with Windows 10 and I am not able to access the database.

  

Host name / address = /198.22.33.44
  Door 5432
  Maintenance Database = xxxxxx
  Username = cesar_r
  Password = ******
  SSL mode = Prefer

The IP number is configured in pg_hba.conf as follows:

  

host all 198.22.33.44/32 password

In the address I put the IP number preceded by / (as it appears in the documentation). The database is installed on a Linux server (Ubuntu).

NOTE: I am trying to connect to a simple user with read-only permission.

    
asked by anonymous 30.03.2017 / 20:09

1 answer

1

It gave me a hard time to run ... but it is as follows after installing pgAdmin4

At a cmd prompt (not for git bash) go to the postgres directory

cd c:\Program Files\PostgreSQL\SUA_VERSAO\bin

Run init

initdb -D "c:/Program Files/PostgreSQL/9.6/data"

Start pg by setting a directory for the log

pg_ctl -D "c:/Program Files/PostgreSQL/9.6/data" -l "C:/Users/SEU_USUARIO/logfile.log" start 

Ready. The user you used in the installation should be used to create the server in pgAdmin4

If you are in doubt about the registered user, enter still at the prompt:

createuser

It will inform the existing name.

    
19.04.2017 / 07:10