Hi Vincent,

its possible using ogr2ogr (and should be possible using QGIS -> Layer
save as ... as well.

# shp2mysql
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

# info about table
ogrinfo MySQL:<my_db>,user=<username>,password=<mypass> <table_name> -so

# mysql2shp
ogr2ogr -f "ESRI Shapefile" <path2shape>.shp
MySQL:<my_db>,user=<username>,password=<mypass> -sql "SELECT * from
<my_table>"

Hope this helps

Marco

Am 05.03.2016 um 08:32 schrieb Vicent García:
>
> Hi Community,
>
>  
>
> 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.
>
>  
>
> Thanks,
>
>  
>
> Vicent.
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [email protected]
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


Attachment: 0x6A30F373.asc
Description: application/pgp-keys

_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to