NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I need to set up a tile server using MySQL but cannot find any documentation for it. I have done it with Postgres by following this link and it works fine. I understand that after downloading the data from planet OSM I need to use osm2pgsql to store the data in Postgres. Is there any similar tool for MySQL?

Also, would Osmosis, Mapnik and Mod_tile work with MySQL?

I absolutely cannot use Postgres. Is there a step to step guide for MySQL?

asked 10 Oct '18, 21:49

vishy91's gravatar image

vishy91
666611
accept rate: 0%

edited 11 Oct '18, 19:20

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

1

Elaborate on "absolutely cannot use postgres" :-)

(20 Oct '18, 09:30) AddisMap_Ale...

You have a long and rocky road ahead of you and the price for "I absolutely cannot use Postgres" will be several person-weeks of work that you have to invest:

  • the standard importer, osm2pgsql, cannot import into MySQL; there has been work in something called "osm2mysql" but that is nowhere near feature-complete. Your most likely bet is using GDAL (ogr2ogr) to load OSM data into MySQL. This will mean that you lose the ability to do incremental updates.
  • the standard renderer, Mapnik, cannot load data from MySQL. You will have to use Geoserver or MapServer instead.
  • the standard map style, OSM-Carto, is built for Mapnik and cannot be used with Geoserver or MapServer; but there are some simpler styles around on the net that work with these renderers.
  • the styles that you will find for Geoserver or MapServer will assume a table structure like the one generated by osm2pgsql, but your import process will generate a different table structure; you will either have to modify the styles to match your table structure, or modify your table structure post-import to look like what comes out of osm2pgsql.
  • the standard tile serving and queuing mechanism (mod_tile and renderd) only works with Mapnik; you will have to switch to a different solution that is compatible with the rendering engine you choose. Most likely you'll use the renderer in WMS mode and then use mapproxy, or MapServer's mapcache for this.

All in all, you will have to invest a lot of time in this. Are you sure "not using Postgres" is worth it?

And no, there is no step by step guide. You'll have to figure this out yourself.

permanent link

answered 11 Oct '18, 08:57

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 11 Oct '18, 09:30

Thank you for the answer @Frederik! This will surely give me a start.

(11 Oct '18, 14:47) vishy91

@vishy91 did you make progress on loading OSM into MySQL?

(Like you, I have no choice in the database behind our application and MySQL is what I have to deal with.)

permanent link

answered 26 Feb '19, 22:07

PPetree's gravatar image

PPetree
111
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×341
×263
×252
×204
×21

question asked: 10 Oct '18, 21:49

question was seen: 3,864 times

last updated: 26 Feb '19, 22:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum