Try with GDAL/OGR (<a href="http://gdal.org/ogr">http://gdal.org/ogr</a>)<br><br>This is example to convert a data ESRI Shapefile to MySQL :<br>ogr2ogr -f MySQL MySQL:gis,user=user,password=secret shape_file.shp -lco GEOMETRY_NAME=the_geom
<br><br>Example to convert a PostGIS to MySQL :<br>
ogr2ogr -f MySQL MySQL:gis,user=user,password=secret PG:"host=<a href="http://172.27.1.245">172.27.1.245</a> user=user dbname=gis"
"map_province_boundary_polygon" -lco GEOMETRY_NAME=the_geom -a_srs
EPSG:4326 -overwrite<br><br>To check your MySQL data :<br>
ogrinfo MySQL:gis,user=root,password=root district -so<br><br>
INFO: Open of `MySQL:gis,user=user,password=secret'<br>
using driver `MySQL' successful.<br>
Layer name: district<br>
Geometry: Polygon<br>
Feature Count: 6<br>
Extent: (105.096718, -6.998588) - (106.774400, -5.875104)<br>
Layer SRS WKT:<br>
(unknown)<br>
FID Column = OGR_FID<br>
Geometry Column = the_geom<br>
district: String (50.0)<br>
province: String (50.0)<br>
class: String (50.0)<br><br><div><span class="gmail_quote">On 11/12/07, <b class="gmail_sendername"><a href="mailto:Kyle.Wilcox@noaa.gov">Kyle.Wilcox@noaa.gov</a></b> <<a href="mailto:Kyle.Wilcox@noaa.gov">Kyle.Wilcox@noaa.gov
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Have you tried using pgsql2shp and then shp2mysql?<br><br>----- Original Message -----
<br>From: tashjp <<a href="mailto:tashjp@hotmail.com">tashjp@hotmail.com</a>><br>Date: Sunday, November 11, 2007 4:38 pm<br>Subject: [postgis-users] geometry from postgis to mysql<br><br>><br>> I had a go posting this in the MySQL forum but with no luck...
<br>> I have a PostGIS database with various columns of geometry data. I<br>> need to<br>> import all this into a MySQL database instead (my uni won't run<br>> PostGIS on<br>> their servers) and have decided to create the tables from scratch
<br>> and then<br>> just do a search and replace on the insert statements to convert from<br>> Postgre to MySQL.<br>><br>> I have tried both<br>><br>> INSERT INTO RoadNode VALUES ('osgb4000000029762763', 3, '2005-09-14',
<br>> 'osgb1000001824287062',<br>> 'GeomFromWKB(0101000000000000008A2B204100000000B07EF940)');<br>><br>> and<br>><br>> INSERT INTO RoadNode VALUES ('osgb4000000029762711', 3, '2005-09-14',
<br>> 'osgb1000001824287705',<br>'010100000000000000082C2041000000006070F940');<br>><br>> both of which return the error message:<br>> >[Error] Script lines: 1-1 --------------------------<br>
> Data truncation: Cannot get geometry object from data you send to the<br>> GEOMETRY field<br>><br>> Does anyone know what I am doing wrong?<br>><br>> Thanks, Natasha<br>> --<br>> View this message in context: 
<a href="http://www.nabble.com/geometry-from-">http://www.nabble.com/geometry-from-</a><br>> postgis-to-mysql-tf4787330.html#a13695426<br>> Sent from the PostGIS - User mailing list archive at <a href="http://Nabble.com">
Nabble.com</a>.<br>><br>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br>_______________________________________________<br>postgis-users mailing list
<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Bayu Kurniawan R<br>GIS Programmer<br>PT. Sigma Cipta Utama<br>Jl. Tekno I Blok B No:5,6,7<br>BSD City Tangerang 15314<br>Indonesia<br>Phone : +62 21 75871955 ext.304