[mapserver-users] populating Mysql from shapefiles for the first time. (newbie)

msibley at crosswire.com msibley at crosswire.com
Mon Aug 2 15:31:16 EDT 2010


Howdy, 

Mapserver 5.6.5, Mysql 5.1.46, GDAL 1.7.2. 

Mapserver is installed and working. I've downloaded the national atlas
state boundaries: statesp020.shp
 and can render it by calling the shapefile directly from a .map file. 

I am attempting to get this same data into Mysql and get the following: 

#######################

ogr2ogr -f "MySQL"
MySQL:'BaseMap,user=root,password=<password>,port=3306' -nln
"US_State_Boundaries" statesp020.shp -update -overwrite

ERROR 1: MySQL error message:Got a packet bigger than
'max_allowed_packet' bytes Description: CreateFeature failed because the
MySQL server cannot read the entire query statement.  Increase the size
of statements your server will allow by altering the
'max_allowed_packet' parameter in your MySQL server configuration.
ERROR 1: Terminating translation prematurely after failed

#######################

My question is: 

Is this _really_ a Mysql problem? (I'm reluctant to trust errors thrown
by mysql) 

If it is a mysql problem, is this a post install configurable parameter,
or to I have to recompile? 

What is a good size for max_allowed_packet?

Thanks in advance! 
Matt




More information about the mapserver-users mailing list