[GRASSLIST:9425] DBMI errors with MySQL tables

Dylan Beaudette dylan.beaudette at gmail.com
Mon Dec 12 15:30:20 EST 2005


Greetings,

Lately I have been having a lot of DBMI-related errors when working with 
GRASS{6,6.1-CVS} vectors  that have a MySQL table attached to them.

For example, I have a table that looks like this in MySQL:
 gg_bulk_density_points;
+----------------+-------------+------+-----+---------+-------+
| Field          | Type        | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
| cat            | int(11)     | YES  |     | NULL    |       |
| easting        | int(11)     | YES  |     | NULL    |       |
| northing       | int(11)     | YES  |     | NULL    |       |
| id             | varchar(10) | YES  |     | NULL    |       |
| pedon_id       | varchar(20) | YES  |     | NULL    |       |
| the_date       | varchar(12) | YES  |     | NULL    |       |
| the_time       | varchar(6)  | YES  |     | NULL    |       |
| db_ring_hz1    | float       | YES  |     | NULL    |       |
| db_ring_hz2    | float       | YES  |     | NULL    |       |
| db_ring_hz3    | float       | YES  |     | NULL    |       |
| db_ring_hz4    | float       | YES  |     | NULL    |       |
| clay_capacity  | float       | YES  |     | NULL    |       |
| dominant_cover | varchar(20) | YES  |     | NULL    |       |
+----------------+-------------+------+-----+---------+-------+

I have connected this table to a vector in GRASS{6,6.1-CVS} like this:
v.db.connect -o map=gg_bulk_density_points driver=mysql 
table=gg_bulk_density_points database="host=localhost,dbname=test" key=cat

Running db.columns returns:
db.columns table=gg_bulk_density_points;
cat
easting
northing
id
pedon_id
the_date
the_time
db_ring_hz1
db_ring_hz2
db_ring_hz3
db_ring_hz4
clay_capacity
dominant_cover

Running db.select on this table gives:
echo "select * from gg_bulk_density_points" | db.select 
table=gg_bulk_density_points
dbmi: Protocol error

Running db.select on any other vector in this location, with a MySQL table 
attached to it works fine...

Also: Trying to add this trouble vector+table in QGIS causes QGIS to die with 
"DBMI error"


Any Ideas, as this is really starting to drive me nuts!

Could it possibly be a column type issue?


-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list