From ba2df41e4401e6298539be37ddd8efc0ead2cd50 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 1 Sep 2004 18:16:32 +0000 Subject: [PATCH] Set $wgDBadminuser and $wgDBadminpassword to root when using the root login so that certain db upgrade steps (eg convertLinks.inc) will not try to use the unprivileges database account to do restructuring. This fixes the problem with upgrading wikis created by the old command-line installer dying at the link table conversion. --- config/index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/index.php b/config/index.php index 2a6567bca6..09a7b37699 100644 --- a/config/index.php +++ b/config/index.php @@ -372,8 +372,8 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { $wgCommandLineMode = false; chdir( ".." ); eval($local); - $wgDBadminuser = $wgDBuser; - $wgDBadminpassword = $wgDBpassword; + $wgDBadminuser = "root"; + $wgDBadminpassword = $conf->RootPW; $wgCommandLineMode = true; $wgUseDatabaseMessages = false; /* FIXME: For database failure */ require_once( "includes/Setup.php" ); @@ -400,6 +400,8 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { } else { print "
  • Trying regular user...\n"; /* Try the regular user... */ + $wgDBadminuser = $wgDBuser; + $wgDBadminpassword = $wgDBpassword; $wgDatabase = Database::newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, "", 1 ); $wgDatabase->isOpen(); $wgDatabase->mIgnoreErrors = true; -- 2.20.1