<div dir="ltr">I downloaded <span style="font-size:13px">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 </span>downloading the new version).<div><br><div><span style="font-size:13px">Also, I should note that the MySQL hints page (</span><a href="http://gdal.org/drv_mysql.html">http://gdal.org/drv_mysql.html</a>) 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.</div><div><br></div><div>If you have binlog enabled in MySQL, you might, like I did, see the following error:</div><div><br></div><div>MySQL error message: Can't change size of file (Errcode: 2 - No such file or directory)<br></div><div><br></div><div>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:</div><div><br></div><div>binlog_cache_size = 16M</div></div><div>binlog_stmt_cache_size = 16M<br></div><div><br></div><div>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! :-)</div><div><br></div><div>Thanks,</div><div><br></div><div>Nick</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 23, 2015 at 2:03 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le mercredi 23 septembre 2015 17:29:42, Nicholas Williams a écrit :<br>
> I'm having trouble getting ogr2ogr working with MySQL on Ubuntu 12.04, but<br>
> I can't figure out why. Configure says MySQL is enabled, but execution says<br>
> it's not.<br>
><br>
> In addition to other dependencies, I installed the MySQL client dev:<br>
><br>
> sudo apt-get install -y libmysqlclient-dev=5.5.28-rel29.1-334.precise<br>
><br>
> And I confirmed that mysql_config exists and is executable:<br>
><br>
> # ls -al /usr/bin/mysql_config<br>
> -rwxr-xr-x 1 root root 6933 Oct 25 2012 /usr/bin/mysql_config<br>
><br>
> I configured, made and installed:<br>
><br>
> ./configure --prefix=/usr --with-spatialite=yes --with-libjson-c=internal<br>
> --with-mysql=yes<br>
> make<br>
> make_install<br>
<br>
</span>Nick,<br>
<br>
If you did several attempts of configure & make while changing configure options<br>
or installing new packages, be sure to do a "make clean" before make. Or just<br>
try "touch ogr/ogrsf_frmts/generic/ogrregisterall.cpp" and make again<br>
<span class="HOEnZb"><font color="#888888"><br>
Even<br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></font></span></blockquote></div><br></div>