Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Your Answer


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.