]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - doc/INSTALL.mysql
Added imagecache headers and doc
[SourceForge/phpwiki.git] / doc / INSTALL.mysql
1 FIXME: these instructions are slightly broken.
2
3 Installing phpwiki with mySQL 
4 -----------------------------
5
6 This assumes that you have a working mySQL server and client setup.
7 Installing mySQL is beyond the scope of this document.
8 For more information on mySQL go to http://www.mysql.org/
9
10 1. If you do not have a suitable database already, create one (using
11    the root or other privileged account you set up when mySQL was
12    installed.)
13
14         mysqladmin -uuser -ppassword create phpwiki
15
16 2. If necessary create a user for that database which has the rights
17    to select, insert, update, delete (again using the root
18    administration account).
19
20         mysql -uuser -ppassword phpwiki
21
22    A mySQL grant statement for this user would look like this:
23
24         GRANT select, insert, update, delete
25         ON phpwiki.*
26         TO wikiuser@localhost
27         IDENTIFIED BY 'password';
28
29 3. Create tables inside your database (still using the root account).
30
31         mysql -uuser -ppassword phpwiki <schemas/mysql.sql
32
33    Note: the user specified in this command needs to have the rights
34          to drop and create tables. Use the same user as in step 1.
35
36    If you are using mySQL 3.21.x or earlier the script may issue an
37    error. In that case remove existing tables manually and delete
38    the "drop tables" lines from schemas/mysql.sql - it should work now
39
40 4. Edit $DBParams in index.php to reflect your settings.
41
42         a) $DBParams['dbtype'] should be set to 'SQL'.
43         b) $DBParams['dsn'] should be set to something like
44            'mysql://username:password@host/phpwiki'.
45            (where 'phpwiki' is the mysql database name.)
46         c) Note that if you set $DBParams['prefix'] to a 
47            non-empty string, you will have to edit
48            schemas/mysql.sql before you perform step
49            three (above).  (Sorry.)
50
51 That's it. phpwiki should now work.
52
53 If you run into problems then check that your mySQL-user has
54 the necessary access rights for the phpwiki tables.
55
56 Hint for Linux-Debian users: it may be necessary to load the mySQL
57 module first: insert the following line in config.php before
58 "mysql.php" gets included:
59 if (!extension_loaded("mysql"))  { dl("mysql.so"); }
60
61 /Arno
62 ahollosi@mail.com
63
64 $Id: INSTALL.mysql,v 1.2 2001-12-03 04:10:34 wainstead Exp $