[GIS] Geoserver – problem with MySQL support (impossible to create MySQL store at all)

geoserverMySQLwindows

I need to access spatial data in MySQL database with Geoserver. Official user manual states: just download package, extract it into WEB-INF/lib directory and all will be OK. Instead, just nothing happens – MySQL option doesn't appear when creating new data source, I can't find any relevant messages in logs and Google doesn't provide a hint.

What do I do:

  1. Download MySQL extension, following recommended link. I have Geoserver version 2.4.3 (uses jre7, downloaded recently). Downloaded archive declares to be of version 2.4.3 (and manual specifically states that versions should match).
  2. Unzip archive and copy it contents to [Geoserver installation directory]\webapps\geoserver\WEB-INF\lib (also tried other paths mentioned in the manual and extension readme, though they don't make any sense – result the same).
  3. Restart Geoserver service (also tried rebooting system), than go to Data -> Stores -> Add new store in Geoserver web interface (logged in as admin). Manual states that MySQL option should be there, but it isn't.

As mentioned, I use Geoserver 2.4.3 (latest at current time), OS is Windows 7 x32. Geoserver is installed as a service and starts automatically.

Logging profile of server is set to VERBOSE_LOGGING, no traces of "mysql" are found. System logs don't contain anything but messages from Service Control Manager about service being started/stopped.
Trying to mess with other JARs in the same directory causes Geoserver to fail. There was installed Geoserver 2.1-beta3 some time ago, but current installation is made into different directory.

I'm interested in any advice how to get Geoserver-MySQL combination working, or how to diagnose why it is problematic/impossible.

Best Answer

Using GIS-Jonathan's hint I solved my problem,I could install the oracle extension.

I had accidentally installed the MySQL plugin jar's into the [Geoserver installation directory]\lib directory first.

Then when I added them to the correct directory, but not yet removed them from the upper lib, it still did not work.

I suspect if you added -verbose onto the java start up command you'll find that another mysql jodbc is being loaded first before the one in the WEB-INF\lib.

You will have to adjust your environment path variable to have the plugin jar to be first, or the only jar available.

When I deleted the files that I had added to [Geoserver installation directory]\lib it started working.

I think that maybe you might have not restarted geoserver service after installing into the WEB-INF\lib directory, and when you added them into the other places it "broke" your install

Related Question