nope - this is how it should work...
authorErik Moeller <erik@users.mediawiki.org>
Thu, 22 Jan 2004 04:49:05 +0000 (04:49 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Thu, 22 Jan 2004 04:49:05 +0000 (04:49 +0000)
AdminSettings.sample
LocalSettings.sample
install.php

index fd373e4..b7e85f6 100644 (file)
@@ -6,11 +6,9 @@
 #
 # Developers: Do not check AdminSettings.php into CVS!
 
-# This data is used to set up the database, and for all
-# maintenance operations on it (rebuild links tables etc.).
-# You can use the root account here. If you don't, make sure 
-# that the user has the rights to create the database before 
-# running the install script, or create the database yourself.
+# This data is used for all maintenance operations.
+# The user DOES NOT NEED TO EXIST. It is created by the
+# installation script.
 
 $wgDBadminuser      = "wikiadmin";
 $wgDBadminpassword  = "adminpass";
index 288a73f..10d228c 100644 (file)
@@ -40,12 +40,15 @@ $wgEmergencyContact = "wikiadmin@myhost.com";
 
 # MySQL settings
 #
-# You should use a user with limited rights here,
-# instead of the root account.
+# The user you specify here DOES NOT NEED TO EXIST.
+# It is created by the installation script.
+#
+# $wgDBsqluser is used for queries through the 
+# web interface.
 #
 $wgDBserver         = "localhost";
-$wgDBuser           = "wikiuser";
 $wgDBname           = "wikidb";
+$wgDBuser           = "wikiuser";
 $wgDBpassword       = "userpass";
 $wgDBsqluser        = "sqluser";
 $wgDBsqlpassword       = "sqlpass";
index c74b684..2d8db90 100644 (file)
@@ -104,20 +104,20 @@ print "\n* * *\nWarning! This script will completely erase any\n" .
 $response = readconsole();
 if ( ! ( "Y" == $response{0} || "y" == $response{0} ) ) { exit(); }
 
-print "\nFor database access, we are using the data in AdminSettings.php.\n";
-print "If you get any error message, please make sure this information is correct\n";
-print "and you have the rights to create a database using the data provided.\n";
-print "(If you have already created the database, don't worry, the script will\n";
-print "simply skip that step.)\n\n";
-
-global $wgDBadminuser, $wgDBadminpassword;
+print "Please enter your root password for the database server now.\n";
+print "It is used to do the following:\n";
+print "1) Create the database\n";
+print "2) Create the users specified in AdminSettings.php and LocalSettings.php\n\n";
+print "You do not need to create any user accounts yourself!\n\n";
+print "MySQL root password (typing will be visible): ";
+$rootpw=readconsole();
 
 # Include rest of code to get things like internationalized messages.
 #
 include_once( "{$IP}/Setup.php" );
 $wgTitle = Title::newFromText( "Installation script" );
 
-$wgDatabase = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, "", 1 );
+$wgDatabase = Database::newFromParams( $wgDBserver, "root", $rootpw, "", 1 );
 if ( !$wgDatabase->isOpen() ) {
        print "Could not connect to database on \"{$wgDBserver}\" as root.\n";
        exit();