Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have installed MS4W in Windows 7. I get an error when I try to convert a shapefile to MySQL database using GDAL/OGR ogr2ogr.

This is the command I'm trying:

C:\ms4w\tools\gdal-ogr>ogr2ogr -f MySQL MySQL:banyuwangigis,user=root,password= -lco GEOMETRY_NAME=layerkecamatan c:\ms4w\apps\banyuwangigis\petadasar\shp\admin polygon.shp

This is the resulting error:

MySQL driver does not support data source creation.

What have I missed?

share|improve this question
add comment

1 Answer

According to the OGR MySQL driver doc:

The MySQL driver does not support creation of new datasets (a database within MySQL), but it does allow creation of new layers within an existing database.

So, in your case, you have to create the database banyuwangigis first.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.