[GRASS-user] Connecting GRASS to a MySQL database?
PixelPusher
pixelpusher at cox.net
Wed Sep 22 16:51:08 EDT 2010
Sorry for the n00bish question, but I'm confused by the GRASS on-line
docs.
I have a MySQL database running on my local computer. Let's say that the
MySQL user name is TRD and he has access to a database called TRD where
I want to store my StateBoundaries table.
I can start the GRASS (6.4.0) Python interface and select
"Database->Manage Databases->Connect" from the pulldown menu. I am then
faced with the choice of driver, where I select "mysql". But, then it
needs the Database name. This is where I get lost. The string in the
text field says, "$GISDBASE/$LOCATION_NAME/$MAPSET/TRD". I'm not sure
where GRASS is getting the values that substitute for those things that
look like script variables. I guess the "$LOCATION_NAME" and "$MAPSET"
come from the location and mapset that I selected when GRASS started.
But, where is "$GISDBASE" set?
I also step through the log in process by setting the appropriate user
name and password. I know that I can use this combination to access the
MySQL database through its command line interface.
The next thing I do is try to test the connection. However, this results
in lots of errors like, "Cannot connect to MySQL, Access denied for
user" and "ERROR: Unable to open database
<$GISDBASE/$LOCATION_NAME/$MAPSET/TRD>". It looks like GRASS is not
using the right username and password and not doing the variable
substitution that I was expecting.
Can anoyone give me some hints on how to get this thing started?
Thanks!
Thom
-------------------------------------------------------
Man will occasionally stumble over the truth, but most of the time
he will pick himself up and continue. -- Winston
Churchill
More information about the grass-user
mailing list