#
# 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";
# 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";
$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();