<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML con formato previo Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.EstiloCorreo18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLconformatoprevioCar
        {mso-style-name:"HTML con formato previo Car";
        mso-style-priority:99;
        mso-style-link:"HTML con formato previo";
        font-family:"Consolas",serif;
        color:black;
        mso-fareast-language:EN-US;}
span.EstiloCorreo21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=CA link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:windowtext'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>I’ve tried to do that (shp2mysql), but I got this error: <o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>“ERROR 1: MySQL error message: The used table type doesn’t suport SPATIAL indexes. Description: ALTER TABLE ‘shapefile’ ADD SPATIAL INDEX(‘poligon_columna’)<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'>ERROR 1: Terminating translation prmaturely after failed translation of layer ESP_adm4 (use -skipfailures to skip errors)”<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Sorry, but it’s my first time that I use this command and I’m a bit lost.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:windowtext'>Vicent.<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=ES style='color:windowtext;mso-fareast-language:CA'>De:</span></b><span lang=ES style='color:windowtext;mso-fareast-language:CA'> Qgis-user [mailto:qgis-user-bounces@lists.osgeo.org] <b>En nombre de </b>Marco Lechner - FOSSGIS e.V.<br><b>Enviado el:</b> dissabte, 5 de març de 2016 11:16<br><b>Para:</b> qgis-user@lists.osgeo.org<br><b>Asunto:</b> Re: [Qgis-user] Export SHP to mySQL<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi Vincent,<br><br>its possible using ogr2ogr (and should be possible using QGIS -> Layer save as ... as well.<br><br># shp2mysql<br>ogr2ogr -f MySQL MySQL:<my_db>,user=<username>,password=<mypass> <path2shape>.shp -nln <target_table> -overwrite -update -lco GEOMETRY_NAME=geom -lco ENGINE=MyISAM -lco CHARSET=UTF-8<br><br># info about table<br>ogrinfo MySQL:<my_db>,user=<username>,password=<mypass> <table_name> -so<br><br># mysql2shp<br>ogr2ogr -f "ESRI Shapefile" <path2shape>.shp MySQL:<my_db>,user=<username>,password=<mypass> -sql "SELECT * from <my_table>"<br><br>Hope this helps<br><br>Marco<br><br>Am 05.03.2016 um 08:32 schrieb Vicent García:<span style='font-size:12.0pt;mso-fareast-language:CA'><o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi Community,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Does anyone know how to export shapefile files to mySQL? I read some things about the topic on the Internet but no clear solutions I’ve found.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Vicent.<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:CA'><br><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>Qgis-user mailing list<o:p></o:p></pre><pre><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><o:p></o:p></pre><pre>List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre><pre>Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:CA'><o:p> </o:p></span></p></div></body></html>