<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Vincent,<br>
<br>
While it should be possible to use MySQL, PostgreSQL with postgis is
much more common and there is much more help available for it in the
QGIS world. So if you are not required to use MySQL for other
reasons, I would recommend to evaluate other database systems first.<br>
<br>
If you need to use MySQL, that's what google brought up concerning
this topic:<br>
<br>
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/18379808/the-used-table-type-doesnt-support-spatial-indexes">http://stackoverflow.com/questions/18379808/the-used-table-type-doesnt-support-spatial-indexes</a><br>
<br>
Deducing from this, it sounds like you are not using the ISAM
engine.<br>
<br>
Kind regards,<br>
Matthias<br>
<br>
<br>
<div class="moz-cite-prefix">On 03/05/2016 02:55 PM, Vicent García
wrote:<br>
</div>
<blockquote
cite="mid:DUB402-EAS303D653F2E730F43660D1E7FCBF0@phx.gbl"
type="cite">
<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]-->
<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
style="color:windowtext;mso-fareast-language:CA"
lang="ES">De:</span></b><span
style="color:windowtext;mso-fareast-language:CA"
lang="ES"> Qgis-user
[<a class="moz-txt-link-freetext" href="mailto:qgis-user-bounces@lists.osgeo.org">mailto:qgis-user-bounces@lists.osgeo.org</a>] <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> <a class="moz-txt-link-abbreviated" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><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 moz-do-not-send="true" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><o:p></o:p></pre>
<pre>List info: <a moz-do-not-send="true" 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 moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Matthias Kuhn
OPENGIS.ch - <a class="moz-txt-link-freetext" href="https://www.opengis.ch">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
</body>
</html>