[GIS] Converting Shapefile to MySQL

grassMySQLogrqgis

I have used Grass GIS imported a .shp file; I now want to export this file to MySQL.

I understood that MySQL will contain the function of all three the files necessary in a Shape file system (.shp – .db – .shx). The import works fine but when I try to export to MySQL I get the following error.

ERROR: Unable to open OGR data source 'Test'

At some stage there was also a message that indicated that MySQL or MySQL Spatial is not available.

I have not used QGIS before. However have purchased GlobalMapper and want to use MySQL instead of Shapefiles. The database is too big to recapture all the info in MySQL I will have to find a way to convert the data from shapefile to MySQL.

Best Answer

Your best bet is to use OGR directly from the command line. OGR's MySQL Driver page has an example of how to use ogr2ogr to import a shapefile:

www.gdal.org/drv_mysql.html