1 FIXME: these instructions are slightly broken.
3 Installing phpwiki with MySQL
4 -----------------------------
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/
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
14 mysqladmin -uuser -ppassword create phpwiki
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).
20 mysql -uuser -ppassword phpwiki
22 A MySQL grant statement for this user would look like this:
24 GRANT select, insert, update, delete, lock tables
27 IDENTIFIED BY 'password';
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.
33 3. Create tables inside your database (still using the root account).
35 mysql -uuser -ppassword phpwiki < schemas/mysql.sql
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.
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
44 4. Edit $DBParams in index.php to reflect your settings.
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.)
55 That's it. phpwiki should now work.
57 If you run into problems then check that your MySQL-user has
58 the necessary access rights for the phpwiki tables.
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"); }
68 $Id: INSTALL.mysql,v 1.3 2004-04-18 03:30:43 rurban Exp $