I am trying to load shapefile into mysql (MYISAM) using ogr2ogr and i get an error that says failed to fetch the requested layer. What could be wrong with my statement is it the issue with quotes or not quotes. using ogr2ogr to check the validity of the shapefile produces results. I am working in a windows environment.
ogr2ogr --config SHAPE_ENCODING="UTF-8" -f "MySql" MySql:"database_name,
-lco engine=MYISAM "C:\data\county.shp"
-nln county -nlt "Multilinestring" -s_srs EPSG:4326

  • check your shapefile if exist the file with cpg extension. XXX.cpg – davos Jul 12 '16 at 18:22
  • Consider to add this as a comment. – david_p Jul 12 '16 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.