]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - doc/INSTALL.mysql
oci8 patch by Philippe Vanhaesendonck + some ADODB notes+fixes
[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, lock tables 
25         ON phpwiki.*
26         TO wikiuser@localhost
27         IDENTIFIED BY 'password';
28
29         Upgrade note: The mysql wikiuser needs to have the LOCK TABLES
30         privilege granted for all the wiki tables (PAGE, VERSION,
31         LINK, RECENT and NONEMPTY). This is a relatively new privilege type.
32
33 3. Create tables inside your database (still using the root account).
34
35         mysql -uuser -ppassword phpwiki < schemas/mysql.sql
36
37    Note: the user specified in this command needs to have the rights
38          to drop and create tables. Use the same user as in step 1.
39
40    If you are using MySQL 3.21.x or earlier the script may issue an
41    error. In that case remove existing tables manually and delete
42    the "drop tables" lines from schemas/mysql.sql - it should work now
43
44 4. Edit $DBParams in index.php to reflect your settings.
45
46         a) $DBParams['dbtype'] should be set to 'SQL'.
47         b) $DBParams['dsn'] should be set to something like
48            'mysql://username:password@host/phpwiki'.
49            (where 'phpwiki' is the mysql database name.)
50         c) Note that if you set $DBParams['prefix'] to a 
51            non-empty string, you will have to edit
52            schemas/mysql.sql before you perform step
53            three (above).  (Sorry.)
54
55 That's it. phpwiki should now work.
56
57 If you run into problems then check that your MySQL-user has
58 the necessary access rights for the phpwiki tables.
59
60 Hint for Linux-Debian users: it may be necessary to load the MySQL
61 module first: insert the following line in config.php before
62 "mysql.php" gets included:
63 if (!extension_loaded("mysql"))  { dl("mysql.so"); }
64
65 /Arno
66 ahollosi@mail.com
67
68 $Id: INSTALL.mysql,v 1.3 2004-04-18 03:30:43 rurban Exp $