Thursday, 6 October 2016

shapefile - Unable to open datasource 'MySQL' using ogr2ogr


I am trying to dump shapefile data into MySQL using GDAL ogr2ogr command


ogr2ogr –f MySQL MySQL:SHP_DB,host=localhost,user=root,password=root feature_object.shp  -nln phil_custom -update -overwrite -lco engine=MYISAM

I am getting this error:



FAILURE:
Unable to open datasource `MySQL' with the following drivers.
-> PCIDSK

-> netCDF
-> JP2OpenJPEG
-> PDF
-> ESRI Shapefile
-> MapInfo File
-> UK .NTF
-> OGR_SDTS
-> S57
-> DGN
-> OGR_VRT

-> REC
-> Memory
-> BNA
-> CSV
-> NAS
-> GML
-> GPX
-> LIBKML
-> KML
-> GeoJSON

-> Interlis 1
-> Interlis 2
-> OGR_GMT
-> GPKG
-> SQLite
-> OGR_DODS
-> ODBC
-> WAsP
-> PGeo
-> MSSQLSpatial

-> OGR_OGDI
-> PostgreSQL
-> MySQL
-> OpenFileGDB
-> XPlane
-> DXF
-> Geoconcept
-> GeoRSS
-> GPSTrackMaker
-> VFK

-> PGDUMP
-> OSM
-> GPSBabel
-> SUA
-> OpenAir
-> OGR_PDS
-> WFS
-> HTF
-> AeronavFAA
-> Geomedia

-> EDIGEO
-> GFT
-> SVG
-> CouchDB
-> Cloudant
-> Idrisi
-> ARCGEN
-> SEGUKOOA
-> SEGY
-> XLS

-> ODS
-> XLSX
-> ElasticSearch
-> Walk
-> CartoDB
-> AmigoCloud
-> SXF
-> Selafin
-> JML
-> PLSCENES

-> CSW
-> VDV
-> TIGER
-> AVCBin
-> AVCE00
-> HTTP

I could not find any solution to this error. What could be the possible cause of this error as I have dump shapefiles data successfully with the same command?


GDAL version is- GDAL 2.1.0, released 2016/04/25


OS- ubuntu 14.04





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...