[GRASS-dev] Access of remote Mysql database ?

"Peter Löwe" peter.loewe at gmx.de
Wed May 2 05:29:15 EDT 2007


Hello Stephan,

unfortunately this does not work:
 ---------------

GRASS 6.3.cvs (ETM_POTSDAM):/usr/local/share/locations > v.db.connect -o map=my_map table=the_table layer=2 key=id driver=mysql database="host=dbserver.foo.org,dbname=the_database,user=joshua,password=swordfish" key=id
WARNING: 'user' in database definition is not supported, use db.login
WARNING: 'password' in database definition is not supported, use db.login
DBMI-MySQL driver error:
Cannot connect to MySQL: Access denied for user 'Peter'@'123.gfz-potsdam.de' (using password: NO)

WARNING: Cannot open database
         'host=dbserver.foo.org,dbname=the_database,user=joshua,password=swordfish'
WARNING: Cannot open database
         'host=dbserver.foo.org,dbname=the_database,user=joshua,password=swordfish'
         by driver 'mysql'
ERROR: Table <the_table> does not exist in database
       <host=dbserver.foo.org,dbname=the_database,user=joshua,password=swordfish>
----------------

Apparently there are two things causing trouble:
1) the login is not recognised - "joshua" is ignored, instead "peter at 123" without a password is used. I already tried db.login so there is a .grasslogin6 file, but this lacks the link to the remote box where the db is kept (but .grasslogin6 is not looked up at this point anyway...)
2) something goes wrong when the database string is processed (last line of error messages <host=...> )

Comments, anyone ?

:-/
Peter



>> Dear all,
>> 
>> the problem I am dealing seems currently not to be covered in the
>> manuals:
>> 
>> How to hook up a remote mysql-database which requires a login ?
>> 
>> There is a mysql-database "the_database" with a table "the_table" on
>> a remote computer "dbserver.foo.org", which can be accessed by a
>> db-user  "joshua"(password: swordfish).
>> 
>> The goal is to establish a layer 2 link between this table (let the
>> column be "id") similar to:
>> 
>> v.db.connect -o map=my_map   table=the_table layer=2 key=id
>> driver=mysql database="host=dbserver.foo.org,dbname=the_database"
>> key=id
>
>what about (untested):
>v.db.connect -o map=my_map   table=the_table layer=2 key=id
>driver=mysql
>database="host=dbserver.foo.org,dbname=the_database,user=joshua,password=swordfish"
>key=id
>
>> 
>> Unfortunately db.login does not provide means to enter a remote
>> server.
>> 
>> Is there a known workaround like hacking the .grasslogin6 -file 

-- 
Dr. Peter Löwe

Diplom-Geograph

<loewe at geomancers.net>
<peter.loewe at gmx.de>





"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail




More information about the grass-dev mailing list