[GRASS-dev] [GRASS GIS] #3167: db.connect: connection to remote database does not work
GRASS GIS
trac at osgeo.org
Mon Sep 26 23:43:00 PDT 2016
#3167: db.connect: connection to remote database does not work
--------------------------+-----------------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: blocker | Milestone: 7.0.5
Component: Database | Version: unspecified
Resolution: | Keywords: postgresql db.connect
CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------------
Comment (by mlennert):
Getting closer:
The issue seems to be in the reading of the dblogin file.
My file contains;
{{{
pg|testgrass|||myRemoteHost|
}}}
But the debug message show:
{{{
D3/3: read_file(): DB login file = </home/mlennert/.grass7/dblogin>
D3/3: ret = 2 : drv=[pg] db=[testgrass] usr=[] pwd=[] host=[], port=[]
}}}
Looking at the sscanf call that reads the data from the file (in
lib/db/dbmi_base/login.c, line 118, I see:
{{{
ret = sscanf(buf, "%[^|]|%[^|]|%[^|]|%[^|]|%[^|]|%[^\n]",
dr, db, usr, pwd, host, port);
}}}
Somehow this doesn't seem to read the line as it should...
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3167#comment:9>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list