How to use MySQL Server with MyGIS?

YuGo yu.gotou at GTEC-NI.COM
Fri Nov 24 22:30:57 EST 2006


Hi everybody,

I compiled Mapserver-4.10.0 with MyGIS.
I excuted this sql on MySQL Sever

--------
create table geomtbl (id int auto_increment primary key,geom geometry);
insert into geomtbl (geom) values(geomfromtext('POINT(15 15)'));
-------

I create this .map file

--------
MAP
IMAGETYPE png
EXTENT 0 0 30 30
SIZE    800 600
SHAPEPATH   "."
UNITS meters
 LAYER
  name geomtest
  CONNECTIONTYPE mygis
  CONNECTION "localhost:root:password:test:bin:"
  DATA "geom from geomtbl geometry"
  TYPE POINT
  STATUS default
  CLASS
    name geomtest
    COLOR 255 255 0
  END
 END
END
-------

and request url via cgi ,but results is

---------
msDrawMap(): Image handling error. Failed to draw layer named 'geomtest'.
msMYGISLayerGetShapeRandom(): Query error. GetShape called on MYGIS layer
with invalid DB query results.
SELECT feature.id, feature.vertices, geometry.WKB_GEOMETRY fro: Query error.
mysql query failed
-------

What's wrong this process?

yu_go



More information about the mapserver-users mailing list