4 OSM server uses a database with the following name:
8 You may create it with your preferable client or run next (linux) command:
12 (change <uid> with appropriate username of administrative user eg. root )
14 > create database openstreetmap default character set utf8;
17 Creating user, password, and access rights
18 ============================================
22 (change <uid> with appropriate username of administrative user eg. root )
24 > grant all privileges on openstreetmap.* to 'openstreetmap'@'localhost' identified by 'openstreetmap';
28 Creating functions For MySQL
29 ==============================
31 Run this command in the db/functions directory:
35 Make sure the db/functions directory is on the MySQL server's library
36 path and restart the MySQL server.
38 On Linux the easiest way to do this is to create /etc/ld.so.conf.d/osm.conf, and place the path to the db/functions directory in it and then run the ldconfig command as root.
40 On OS X: sudo ln -s /path_to_your_osm_install/sites/rails_port/db/functions/libmyosm.so /usr/local/lib/libmyosm.so
42 Now create the functions as follows:
44 $ mysql -u <uid> -p openstreetmap
46 (change <uid> with appropriate username of administrative user eg. root )
48 > create function tile_for_point returns integer soname 'libmyosm.so';
49 > create function maptile_for_point returns integer soname 'libmyosm.so';
52 Creating functions for PgSQL
53 ==============================
55 Run this command in the db/functions directory:
59 Now create the function as follows:
62 (This may need authentication or a -u <dbowneruid>)
64 > CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4
65 AS '/path/to/rails-port/db/functions/libpgosm', 'maptile_for_point'
68 Creating database skeleton tables
69 ===================================
71 Run this command from the root of your rails directory:
75 This will create the db for you