[FWTools] ogr2ogr with MySQL

Mateusz Loskot mateusz at loskot.net
Thu Oct 12 12:27:20 EDT 2006


Frances Collier wrote:
> I am trying to import shape file data into a MySQL database using
> ogr2ogr. I am running on a Windows Server 2003 Standard. When I try to
> run my statement, I get this error: “MySQL driver does not support data
> source creation.”  I checked the dlls in the FWTools 1.0.5 bin directory
> and have libmysql.dll there. I’ve googled, and searched through the
> forums, but haven’t found anything pertaining to this problem. Here’s
> the actual statement I’m trying to run: “ogr2ogr –f MySQL
> MySQL:test,user=xxx,password=xxx,port=3306
> D:\CountyPopulation\countPop.shp –nln countypop –lco PRECISION=NO”

According to MySQL driver docs:

http://www.gdal.org/ogr/drv_mysql.html

Currently, MySQL driver does not support database creation.

So, you have to create 'test' database manually first.
Then you can import layers to it.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net


More information about the FWTools mailing list