[gdal-dev] Unable to find driver 'MYSQL' after successful config and make

Nicholas Williams nicholas+osgeo at nicholaswilliams.net
Wed Sep 23 09:00:20 PDT 2015


Realized I left out which version I was on. I compiled and installed
from gdal-2.0.0.tar.gz. I'm about to try gdal-2.0.1.tar.gz.

Thanks,

Nick

On Wed, Sep 23, 2015 at 10:29 AM, Nicholas Williams <
nicholas+osgeo at nicholaswilliams.net> wrote:

> I'm having trouble getting ogr2ogr working with MySQL on Ubuntu 12.04, but
> I can't figure out why. Configure says MySQL is enabled, but execution says
> it's not.
>
> In addition to other dependencies, I installed the MySQL client dev:
>
> sudo apt-get install -y libmysqlclient-dev=5.5.28-rel29.1-334.precise
>
> And I confirmed that mysql_config exists and is executable:
>
> # ls -al /usr/bin/mysql_config
> -rwxr-xr-x 1 root root 6933 Oct 25  2012 /usr/bin/mysql_config
>
> I configured, made and installed:
>
> ./configure --prefix=/usr --with-spatialite=yes --with-libjson-c=internal
> --with-mysql=yes
> make
> make_install
>
> The configure output suggests that MySQL support is enabled. I've
> abbreviated it below, but I can post the entire output on request:
>
> checking for mysql_config... /usr/bin/mysql_config
> checking for MySQL... yes
> ...
> GDAL is now configured for x86_64-unknown-linux-gnu
>
>   Installation directory:    /usr
>   C compiler:                gcc -g -O2
>   C++ compiler:              g++ -g -O2
>
>   LIBTOOL support:           yes
>   ...
>   cURL support (wms/wcs/...):yes
>   PostgreSQL support:        no
>   MySQL support:             yes
>   ...
>   Expat support:             no
>   libxml2 support:           no
>   ...
>   SQLite support:            yes
>   PCRE support:              no
>   SpatiaLite support:        yes
>
> I would think the "MySQL support: yes" and "checking for MySQL... yes"
> would be fairly concrete. Additionally, I have scoured the make output, and
> there were no errors or warnings around any of the MySQl stuff. So, it
> should work, right? Apparently not:
>
> # ogr2ogr --format mysql
> ERROR 1: --format option given with format 'mysql', but that format not
> recognised.  Use the --formats option to get a list of available formats,
> and use the short code (ie. GTiff or HFA) as the format identifier.
>
> # ogr2ogr -f MYSQL MYSQL:"geo,tables=Time_Zone_Polygons" -nln
> Time_Zone_Polygons -nlt POLYGON \
>     -update -append -progress -gt 40000 -fieldmap 2 \
>     -lco ENGINE=MYISAM -lco LAUNDER=yes -lco FID=id -lco FID64=TRUE -lco
> GEOMETRY_NAME=region tz_world.shp
> Unable to find driver `MYSQL'.
> The following drivers are available:
>   -> `PCIDSK'
>   ... (no MySQL anywhere)
>
> Can I get some help/advice figuring out what went wrong?
>
> Thanks,
>
> Nick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150923/149a6232/attachment.html>


More information about the gdal-dev mailing list