]> git.openstreetmap.org Git - rails.git/blob - db/README
Fix typo in HTML version of account confirmation message.
[rails.git] / db / README
1 Creating database
2 ===================
3
4 OSM server uses a database with the following name:
5
6 openstreetmap
7
8 You may create it with your preferable client or run next (linux) command:
9
10 $ mysqladmin -u <uid> -p create openstreetmap
11
12 (change <uid> with appropriate username of administrative user eg. root )
13
14 Creating user, password, and access rights
15 ============================================
16
17 $ mysql -u <uid> -p
18
19 (change <uid> with appropriate username of administrative user eg. root )
20
21 > grant all privileges on openstreetmap.* to 'openstreetmap'@'localhost' identified by 'openstreetmap';
22 > flush privileges;
23 > exit
24
25 Creating functions
26 ====================
27
28 Run this command in the db/functions directory:
29
30 $ make
31
32 The above command should work for linux and most other Unix systems
33 that use ELF shared objects. For MacOS X you will need to do:
34
35 $ make libquadtile.dylib
36
37 Make sure the db/functions directory is on the MySQL server's library
38 path and restart the MySQL server. On linux the easiest way to do this
39 is to create /etc/ld.so.conf.d/osm.conf and place the path to the
40 db/functions directory in it and then run the following command as root:
41
42 $ ldconfig
43
44 Now create the functions as follows:
45
46 $ mysql -u <uid> -p openstreetmap
47
48 (change <uid> with appropriate username of administrative user eg. root )
49
50 > create function tile_for_point returns integer soname 'libquadtile.so';
51 > exit
52
53 or, for MacOS X:
54
55 > create function tile_for_point returns integer soname 'libquadtile.dylib';
56 > exit
57
58 Creating database skeleton tables
59 ===================================
60
61 Run this command from the root of your rails directory:
62
63 $ rake db:migrate
64
65 This will create the db for you