Newer
Older
ubixos-web / docroot / phpwiki / INSTALL.mysql
@reddawg reddawg on 29 Jun 2004 1 KB UbixOS Web Site

Installing phpwiki with mySQL 
-----------------------------

This assumes that you have a working mySQL server and client setup.
Installing mySQL is beyond the scope of this document.
For more information on mySQL go to http://www.mysql.org/

1. If you do not have a suitable database already, create one (using
   the root or other privileged account you set up when mySQL was
   installed.)

	mysqladmin -uuser -ppassword create phpwiki

2. If necessary create a user for that database which has the rights
   to select, insert, update, delete (again using the root
   administration account).

	mysql -uuser -ppassword phpwiki

   A mySQL grant statement for this user would look like this:

	GRANT select, insert, update, delete
	ON phpwiki.*
	TO wikiuser@localhost
	IDENTIFIED BY 'password';

3. Create tables inside your database (still using the root account).

	mysql -uuser -ppassword phpwiki <schemas/schema.mysql

   Note: the user specified in this command needs to have the rights
         to drop and create tables. Use the same user as in step 1.

   If you are using mySQL 3.21.x or earlier the script may issue an
   error. In that case remove existing tables manually and delete
   the "drop tables" lines from schemas/schema.mysql - it should work now

4. Edit lib/config.php to reflect your settings.

	a) comment out the DBM settings
	b) uncomment the mySQL settings
	c) set $mysql_user to "wikiuser" as used in step 2
	d) set $mysql_pwd to "password" as used in step 2
	e) set $mysql_db to "phpwiki" as used in step 1


That's it. phpwiki should now work.

If you run into problems then check that your mySQL-user has
the necessary access rights for the phpwiki tables.

Hint for Linux-Debian users: it may be necessary to load the mySQL
module first: insert the following line in config.php before
"mysql.php" gets included:
if (!extension_loaded("mysql"))  { dl("mysql.so"); }

/Arno
ahollosi@mail.com

$Id$