From d032e7dbd3a2954d3496334fa5ae7a303d43108c Mon Sep 17 00:00:00 2001 From: dairiki Date: Fri, 9 Nov 2001 03:13:00 +0000 Subject: [PATCH] SF patch #479791 by Carsten Klapp: Improvements to the mysql installation documentation. git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/branches/release-1_2-branch@626 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- INSTALL.mysql | 20 +++++++++++++------- lib/config.php | 24 +++++++++++++++++++----- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/INSTALL.mysql b/INSTALL.mysql index 14404643e..5b643e183 100644 --- a/INSTALL.mysql +++ b/INSTALL.mysql @@ -6,20 +6,26 @@ 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. +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. A mySQL grant statment for this user - would look like this: - +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. +3. Create tables inside your database (still using the root account). mysql -uuser -ppassword phpwiki \n"; }; } - rcs_id('$Id: config.php,v 1.24.2.6 2001-11-08 23:15:43 dairiki Exp $'); + rcs_id('$Id: config.php,v 1.24.2.7 2001-11-09 03:13:00 dairiki Exp $'); // end essential internal stuff @@ -84,15 +84,29 @@ // MySQL settings -- see INSTALL.mysql for details on using MySQL } elseif ($WhichDatabase == 'mysql') { + // MySQL server host: + $mysql_server = 'localhost'; + + // username as used in step 2 of INSTALL.mysql: + $mysql_user = 'wikiuser'; + + // password of above user (or leave blank if none): + $mysql_pwd = ''; + + // name of the mysql database + // (this used to default to 'wiki' prior to phpwiki-1.2.2) + $mysql_db = 'phpwiki'; + + // Names of the tables. + // You probably don't need to change these. If you do change + // them you will also have to make corresponding changes in + // schemas/schema.mysql before you initialize the database. $WikiPageStore = "wiki"; $ArchivePageStore = "archive"; $WikiLinksStore = "wikilinks"; $WikiScoreStore = "wikiscore"; $HitCountStore = "hitcount"; - $mysql_server = 'localhost'; - $mysql_user = 'root'; - $mysql_pwd = ''; - $mysql_db = 'wiki'; + include "lib/mysql.php"; // PostgreSQL settings -- see INSTALL.pgsql for more details -- 2.45.2