Opened 4 years ago

Closed 3 years ago

#2960 closed defect (fixed)

db.login port parameter

Reported by: lucadelu Owned by: grass-dev@…
Priority: major Milestone: 7.2.0
Component: Database Version: svn-trunk
Keywords: database, postgresql, db.login Cc:
CPU: Unspecified Platform: Unspecified

Description

It seems that PostgreSQL database library is not working correctly with port different from the standard 5432.

Following the steps I did

db.connect driver=pg database=grassdata

db.login driver=pg database=grassdata user=lucadelu port=5433 host=localhost
db.login -p

  pg|grassdata|lucadelu|||

cat /home/lucadelu/.grass7/dblogin

  pg|grassdata|lucadelu||localhost|5433

db.tables

  DBMI-PostgreSQL driver error:
  Connection failed.
  could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

  DBMI-PostgreSQL driver error:
  Connection failed.
  could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

  ERROR: Unable to open database <grassdata>

Change History (6)

comment:1 Changed 4 years ago by martinl

Milestone: 7.0.47.1.0

comment:2 Changed 4 years ago by martinl

Component: DatasetsDatabase

comment:3 Changed 4 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

comment:4 Changed 3 years ago by mlennert

What's the status of this bug ? Would be nice to have it fixed for 7.2.

comment:5 Changed 3 years ago by mlennert

I imagine that this is the same issue as #3167 which was fixed. Could you see if you still have this issue ?

comment:6 in reply to:  5 Changed 3 years ago by martinl

Resolution: fixed
Status: newclosed

Replying to mlennert:

I imagine that this is the same issue as #3167 which was fixed. Could you see if you still have this issue ?

Right, seems to be like that. I tested PG database cluster running on port 5433.

db.login dri=pg data=db port=5433
db.tables -p

Worked. Closing, feel free to re-open if needed.

Note: See TracTickets for help on using tickets.