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, 21:49

vishy91's gravatar image

vishy91
516
accept rate: 0%

edited 11 Oct, 19:20

aseerel4c26's gravatar image

aseerel4c26 ♦
30.7k15232520

1

Elaborate on "absolutely cannot use postgres" :-)

(2 days ago) 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, 08:57

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
66.0k806101021
accept rate: 24%

edited 11 Oct, 09:30

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

(11 Oct, 14:47) vishy91
Your answer
toggle preview

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:

×301
×199
×176
×125
×19

question asked: 10 Oct, 21:49

question was seen: 106 times

last updated: 2 days ago

powered by OSQA