[gdal-dev] Unable to find driver 'MYSQL' after successful config and make
Nicholas Williams
nicholas+osgeo at nicholaswilliams.net
Wed Sep 23 12:07:54 PDT 2015
I downloaded gdal-2.0.1.tar.gz, reconfigured, recompiled, reinstalled, and
suddenly it's working. So maybe there was a problem with 2.0.0? Or maybe,
as Even said (as I was typing this message), the problem was needing to
"make clean" (I wiped the directory after downloading the new version).
Also, I should note that the MySQL hints page (
http://gdal.org/drv_mysql.html) is missing a certain type of error. It
correctly warns me about the "Got a bigger packet" warning, and changing
"max_allowed_packet" fixes that problem. But it's not the only problem.
If you have binlog enabled in MySQL, you might, like I did, see the
following error:
MySQL error message: Can't change size of file (Errcode: 2 - No such file
or directory)
It took me a while to figure out that the problem was related to binlog (no
file name in the error message and no error message in the log file was not
helpful). I needed to set:
binlog_cache_size = 16M
binlog_stmt_cache_size = 16M
To get rid of that error. Those values default to just 32K (WAAAYYY to
small). Once I set the documented setting and those other two settings to
higher values, it imported the shapefile into MySQL like a charm! :-)
Thanks,
Nick
On Wed, Sep 23, 2015 at 2:03 PM, Even Rouault <even.rouault at spatialys.com>
wrote:
> Le mercredi 23 septembre 2015 17:29:42, Nicholas Williams a écrit :
> > 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
>
> Nick,
>
> If you did several attempts of configure & make while changing configure
> options
> or installing new packages, be sure to do a "make clean" before make. Or
> just
> try "touch ogr/ogrsf_frmts/generic/ogrregisterall.cpp" and make again
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150923/61ded2c2/attachment.html>
More information about the gdal-dev
mailing list