[MediaWiki-l] Upgrade to MW 1.31.0 fails on maintenance/update.php

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
My current setup, under which MW is running swimmingly:

Fedora 27
Apache 2.4.33
MariaDB 10.2.14
MediaWiki 1.30.0

I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball into a
fresh directory, copied over my LocalSettings.php file, and changed the
symlink that I use with Apache to point to the new location.  I then
attempted to run maintenance/update.php and it cryptically ended with a
whimper:

====================
MediaWiki 1.31.0 Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for wikidb
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with
--quick) ... 0
Turning off Content Handler DB fields for this part of upgrade.
Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails =
true; and $wgShowDBErrorBacktrace = true; at the bottom of
LocalSettings.php to show detailed debugging information.
====================

I added the suggested flags to LocalSettings and got the following in my
browser:

====================

[WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page Wikimedia\Rdbms\DBQueryError
from line 1457 of
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php: A
database query error has occurred. Did you forget to run your application's
database schema updater after upgrading?
Query: SELECT
user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
Function: User::loadFromDatabase
Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for table
'user' (localhost)

Backtrace:

#0
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
string)
#1
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string,
boolean)
#2
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
Wikimedia\Rdbms\Database->query(string, string)
#3
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
Wikimedia\Rdbms\Database->selectRow(array, array, array, string, array,
array)
#5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
User->loadFromDatabase(integer)
#6
/var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
User->{closure}(boolean, integer, array, NULL)
#7
/var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
#8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
User->loadFromCache()
#10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
User->loadFromId(integer)
#11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
User->load()
#12
/var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
MediaWiki\Session\UserInfo::newFromId(string)
#13 /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
#14 /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
#15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#16 /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
WebRequest->getSession()
#17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
MediaWiki\Session\SessionManager::getGlobalSession()
#18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
require_once(string)
#19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
#20 {main}

====================
Needless to say, I'm pretty confused here.  Nothing has changed to my
configuration (and probably to the wiki's contents) since I successfully
upgraded to 1.30.0.  If I switch my symlink back to point to my MW 1.30.0
install, the site loads just fine.  So it appears the updater is bombing
when it tries to add the field "ipb_id" to table "ipblocks".

What confuses me is the "SELECT command denied to user 'wikiuser'@'localhost'"
error.  My wiki has two MariaDB users:  "wikuser" (the standard user set in
$wgDBuser) and an admin user set with $wgDBadminuser.  Neither user account
has changed, either in the DB or in LocalSettings.

It *almost* looks like the updater is trying to use the standard user to do
admin functions, but even that doesn't make much sense.  "wikiuser" has
SELECT access to all tables in the DB, while the admin user has all
permissions to the entire DB.  So I don't see why that specific error would
crop up; even "wikiuser" should be able to perform a simple SELECT.

Fortunately, I can switch back to MW 1.30.0 pretty easily, but I thought I
ought to report the problem.

ADDENDUM:  I just noticed the following in the 1.31 release notes:

====================
Important pre-upgrade notes for 1.31

   - If you're using MySQL, SQLite, or MSSQL, are not using update.php to
   apply schema changes, and cannot have downtime to run
   migrateArchiveText.php and apply patch-drop-ar_text.sql manually, you'll
   have to apply a default value to the ar_text and ar_flags columns of the
   archive table or make those columns nullable before upgrading to MediaWiki
   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to do this
   for MySQL.

====================
Based on this, I think there's something screwy with update.php.  I *am*
using update.php to apply schema changes, but I'm guessing it's not working
correctly.  I have *not* tried this manual fix (and would prefer not to
unless absolutely necessary).

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Ryan Schmidt-76
The update is failing for some reason. If you re-run the update.php script with those two settings in LocalSettings.php, it will give you the exact error message for what failed. With that info, we should be able to figure out what is going on and therefore what steps need to be taken to make the upgrade successful.

Reply back with the error message from update.php once you have it.

> On Jun 14, 2018, at 9:23 AM, Jeff Darlington <[hidden email]> wrote:
>
> My current setup, under which MW is running swimmingly:
>
> Fedora 27
> Apache 2.4.33
> MariaDB 10.2.14
> MediaWiki 1.30.0
>
> I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball into a
> fresh directory, copied over my LocalSettings.php file, and changed the
> symlink that I use with Apache to point to the new location.  I then
> attempted to run maintenance/update.php and it cryptically ended with a
> whimper:
>
> ====================
> MediaWiki 1.31.0 Updater
>
> Your composer.lock file is up to date with current dependencies!
> Going to run database updates for wikidb
> Depending on the size of your database this may take a while!
> Abort with control-c in the next five seconds (skip this countdown with
> --quick) ... 0
> Turning off Content Handler DB fields for this part of upgrade.
> Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails =
> true; and $wgShowDBErrorBacktrace = true; at the bottom of
> LocalSettings.php to show detailed debugging information.
> ====================
>
> I added the suggested flags to LocalSettings and got the following in my
> browser:
>
> ====================
>
> [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page Wikimedia\Rdbms\DBQueryError
> from line 1457 of
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php: A
> database query error has occurred. Did you forget to run your application's
> database schema updater after upgrading?
> Query: SELECT
> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
> FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
> Function: User::loadFromDatabase
> Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for table
> 'user' (localhost)
>
> Backtrace:
>
> #0
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
> Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> string)
> #1
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
> Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string,
> boolean)
> #2
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
> Wikimedia\Rdbms\Database->query(string, string)
> #3
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
> Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
> #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
> Wikimedia\Rdbms\Database->selectRow(array, array, array, string, array,
> array)
> #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
> User->loadFromDatabase(integer)
> #6
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
> User->{closure}(boolean, integer, array, NULL)
> #7
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
> WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
> #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
> WANObjectCache->getWithSetCallback(string, integer, Closure, array)
> #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
> User->loadFromCache()
> #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
> User->loadFromId(integer)
> #11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
> User->load()
> #12
> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
> MediaWiki\Session\UserInfo::newFromId(string)
> #13 /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
> MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
> #14 /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
> MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
> #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
> MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
> #16 /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
> WebRequest->getSession()
> #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
> MediaWiki\Session\SessionManager::getGlobalSession()
> #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
> require_once(string)
> #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
> #20 {main}
>
> ====================
> Needless to say, I'm pretty confused here.  Nothing has changed to my
> configuration (and probably to the wiki's contents) since I successfully
> upgraded to 1.30.0.  If I switch my symlink back to point to my MW 1.30.0
> install, the site loads just fine.  So it appears the updater is bombing
> when it tries to add the field "ipb_id" to table "ipblocks".
>
> What confuses me is the "SELECT command denied to user 'wikiuser'@'localhost'"
> error.  My wiki has two MariaDB users:  "wikuser" (the standard user set in
> $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user account
> has changed, either in the DB or in LocalSettings.
>
> It *almost* looks like the updater is trying to use the standard user to do
> admin functions, but even that doesn't make much sense.  "wikiuser" has
> SELECT access to all tables in the DB, while the admin user has all
> permissions to the entire DB.  So I don't see why that specific error would
> crop up; even "wikiuser" should be able to perform a simple SELECT.
>
> Fortunately, I can switch back to MW 1.30.0 pretty easily, but I thought I
> ought to report the problem.
>
> ADDENDUM:  I just noticed the following in the 1.31 release notes:
>
> ====================
> Important pre-upgrade notes for 1.31
>
>   - If you're using MySQL, SQLite, or MSSQL, are not using update.php to
>   apply schema changes, and cannot have downtime to run
>   migrateArchiveText.php and apply patch-drop-ar_text.sql manually, you'll
>   have to apply a default value to the ar_text and ar_flags columns of the
>   archive table or make those columns nullable before upgrading to MediaWiki
>   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to do this
>   for MySQL.
>
> ====================
> Based on this, I think there's something screwy with update.php.  I *am*
> using update.php to apply schema changes, but I'm guessing it's not working
> correctly.  I have *not* tried this manual fix (and would prefer not to
> unless absolutely necessary).
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
Some follow-up investigation on my part, in regard to my previous post
[0].  (Apologies from not simply replying to it and if that screws up
threading in the list archives; it looks like my mail is a bit screwy at
the moment.)

I forgot to include that my PHP version is 7.1.18.

Assuming that maintenance/update.php is blowing up at the "Adding ipb_id
field to table ipblocks" step (since that's where the useful output
appeared to stop), I tried to do some digging into where this might be
occurring.  I found several scripts under maintenance/archives (assuming
this is the path for MySQL/MariaDB scripts, since other paths seem to
indicate other RDBMSes) where field "ipb_id" was being added to table
"ipblocks".

I then took a look at DB backup that I took immediately before attempting
the upgrade.  Sure enough, column "ipb_id" already exists on table
"ipblocks" in my MW 1.30.0 DB.  I'm beginning to wonder if the MW 1.31.0
update.php script is attempting to ALTER ipblocks to add ipb_id when it
already exists, causing the entire script to bomb.  Unfortunately, it looks
like update.php is a infinitely spiraling nest of dependencies and
call-backs, so I doubt I'll have time to dig any deeper than that.

[0] https://lists.wikimedia.org/pipermail/mediawiki-l/2018-June/047511.html

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
In reply to this post by Ryan Schmidt-76
I could have sworn I had those to variables added when I tried running it a
second time, but I guess I didn't.  Here's the updated output:

=============
MediaWiki 1.31.0 Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for wikidb
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with
--quick) ... 0
Turning off Content Handler DB fields for this part of upgrade.
Adding ipb_id field to table ipblocks ...[ff08e486f9ef856d82769935] [no
req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php: A
database query error has occurred. Did you forget to run your application's
database schema updater after upgrading?
Query: ALTER TABLE `mediawiki`.`ipblocks`
 ADD ipb_auto tinyint NOT NULL default '0',
 ADD ipb_id int NOT NULL auto_increment,
 ADD PRIMARY KEY (ipb_id)

Function: Wikimedia\Rdbms\Database::sourceFile(
/var/www/gpf/mediawiki-1.31.0/maintenance/archives/patch-ipblocks.sql )
Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for table
'ipblocks' (localhost)

Backtrace:
#0
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
string)
#1
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string,
boolean)
#2
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4194):
Wikimedia\Rdbms\Database->query(string, string)
#3
/var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4129):
Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
NULL)
#4
/var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(683):
Wikimedia\Rdbms\Database->sourceFile(string)
#5
/var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(751):
DatabaseUpdater->applyPatch(string, boolean, string)
#6
/var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(482):
DatabaseUpdater->addField(string, string, string)
#7
/var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(446):
DatabaseUpdater->runUpdates(array, boolean)
#8 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(200):
DatabaseUpdater->doUpdates(array)
#9 /var/www/gpf/mediawiki-1.31.0/maintenance/doMaintenance.php(94):
UpdateMediaWiki->execute()
#10 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(245):
require_once(string)
#11 {main}
=============

The "ALTER command denied to user 'wikiadmin'@'localhost' for table
'ipblocks'" error shouldn't be a permissions issue; "wikiadmin" has full
permissions to the DB.

However, as stated in my second message, column ipb_id already exists on
ipblocks as of my MW 1.30.0 install.  It could be barfing on the ALTER ADD
because the column already exists.

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/


On Thu, Jun 14, 2018 at 1:35 PM Ryan Schmidt <[hidden email]> wrote:

> The update is failing for some reason. If you re-run the update.php script
> with those two settings in LocalSettings.php, it will give you the exact
> error message for what failed. With that info, we should be able to figure
> out what is going on and therefore what steps need to be taken to make the
> upgrade successful.
>
> Reply back with the error message from update.php once you have it.
>
> > On Jun 14, 2018, at 9:23 AM, Jeff Darlington <[hidden email]>
> wrote:
> >
> > My current setup, under which MW is running swimmingly:
> >
> > Fedora 27
> > Apache 2.4.33
> > MariaDB 10.2.14
> > MediaWiki 1.30.0
> >
> > I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball into a
> > fresh directory, copied over my LocalSettings.php file, and changed the
> > symlink that I use with Apache to point to the new location.  I then
> > attempted to run maintenance/update.php and it cryptically ended with a
> > whimper:
> >
> > ====================
> > MediaWiki 1.31.0 Updater
> >
> > Your composer.lock file is up to date with current dependencies!
> > Going to run database updates for wikidb
> > Depending on the size of your database this may take a while!
> > Abort with control-c in the next five seconds (skip this countdown with
> > --quick) ... 0
> > Turning off Content Handler DB fields for this part of upgrade.
> > Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails =
> > true; and $wgShowDBErrorBacktrace = true; at the bottom of
> > LocalSettings.php to show detailed debugging information.
> > ====================
> >
> > I added the suggested flags to LocalSettings and got the following in my
> > browser:
> >
> > ====================
> >
> > [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page
> Wikimedia\Rdbms\DBQueryError
> > from line 1457 of
> > /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
> A
> > database query error has occurred. Did you forget to run your
> application's
> > database schema updater after upgrading?
> > Query: SELECT
> >
> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
> > FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
> > Function: User::loadFromDatabase
> > Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for
> table
> > 'user' (localhost)
> >
> > Backtrace:
> >
> > #0
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> > string)
> > #1
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
> string,
> > boolean)
> > #2
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
> > Wikimedia\Rdbms\Database->query(string, string)
> > #3
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
> > Wikimedia\Rdbms\Database->select(array, array, array, string, array,
> array)
> > #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
> > Wikimedia\Rdbms\Database->selectRow(array, array, array, string, array,
> > array)
> > #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
> > User->loadFromDatabase(integer)
> > #6
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
> > User->{closure}(boolean, integer, array, NULL)
> > #7
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
> > WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
> > #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
> > WANObjectCache->getWithSetCallback(string, integer, Closure, array)
> > #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
> > User->loadFromCache()
> > #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
> > User->loadFromId(integer)
> > #11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
> > User->load()
> > #12
> >
> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
> > MediaWiki\Session\UserInfo::newFromId(string)
> > #13
> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
> > MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
> > #14
> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
> > MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
> > #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
> > MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
> > #16
> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
> > WebRequest->getSession()
> > #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
> > MediaWiki\Session\SessionManager::getGlobalSession()
> > #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
> > require_once(string)
> > #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
> > #20 {main}
> >
> > ====================
> > Needless to say, I'm pretty confused here.  Nothing has changed to my
> > configuration (and probably to the wiki's contents) since I successfully
> > upgraded to 1.30.0.  If I switch my symlink back to point to my MW 1.30.0
> > install, the site loads just fine.  So it appears the updater is bombing
> > when it tries to add the field "ipb_id" to table "ipblocks".
> >
> > What confuses me is the "SELECT command denied to user 'wikiuser'@
> 'localhost'"
> > error.  My wiki has two MariaDB users:  "wikuser" (the standard user set
> in
> > $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user
> account
> > has changed, either in the DB or in LocalSettings.
> >
> > It *almost* looks like the updater is trying to use the standard user to
> do
> > admin functions, but even that doesn't make much sense.  "wikiuser" has
> > SELECT access to all tables in the DB, while the admin user has all
> > permissions to the entire DB.  So I don't see why that specific error
> would
> > crop up; even "wikiuser" should be able to perform a simple SELECT.
> >
> > Fortunately, I can switch back to MW 1.30.0 pretty easily, but I thought
> I
> > ought to report the problem.
> >
> > ADDENDUM:  I just noticed the following in the 1.31 release notes:
> >
> > ====================
> > Important pre-upgrade notes for 1.31
> >
> >   - If you're using MySQL, SQLite, or MSSQL, are not using update.php to
> >   apply schema changes, and cannot have downtime to run
> >   migrateArchiveText.php and apply patch-drop-ar_text.sql manually,
> you'll
> >   have to apply a default value to the ar_text and ar_flags columns of
> the
> >   archive table or make those columns nullable before upgrading to
> MediaWiki
> >   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to do
> this
> >   for MySQL.
> >
> > ====================
> > Based on this, I think there's something screwy with update.php.  I *am*
> > using update.php to apply schema changes, but I'm guessing it's not
> working
> > correctly.  I have *not* tried this manual fix (and would prefer not to
> > unless absolutely necessary).
> >
> > Jeffrey T. Darlington
> > General Protection Fault
> > https://www.gpf-comics.com/
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Brian Wolff
The error should be different if it was due to the column already existing

Are you sure that wikiadmin has full permissions (Check to make sure
that the permissions are for the right db, as well as for the right
host).

--
Brian

On Thu, Jun 14, 2018 at 5:43 PM, Jeff Darlington
<[hidden email]> wrote:

> I could have sworn I had those to variables added when I tried running it a
> second time, but I guess I didn't.  Here's the updated output:
>
> =============
> MediaWiki 1.31.0 Updater
>
> Your composer.lock file is up to date with current dependencies!
> Going to run database updates for wikidb
> Depending on the size of your database this may take a while!
> Abort with control-c in the next five seconds (skip this countdown with
> --quick) ... 0
> Turning off Content Handler DB fields for this part of upgrade.
> Adding ipb_id field to table ipblocks ...[ff08e486f9ef856d82769935] [no
> req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php: A
> database query error has occurred. Did you forget to run your application's
> database schema updater after upgrading?
> Query: ALTER TABLE `mediawiki`.`ipblocks`
>  ADD ipb_auto tinyint NOT NULL default '0',
>  ADD ipb_id int NOT NULL auto_increment,
>  ADD PRIMARY KEY (ipb_id)
>
> Function: Wikimedia\Rdbms\Database::sourceFile(
> /var/www/gpf/mediawiki-1.31.0/maintenance/archives/patch-ipblocks.sql )
> Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for table
> 'ipblocks' (localhost)
>
> Backtrace:
> #0
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
> Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> string)
> #1
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
> Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string,
> boolean)
> #2
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4194):
> Wikimedia\Rdbms\Database->query(string, string)
> #3
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4129):
> Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
> NULL)
> #4
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(683):
> Wikimedia\Rdbms\Database->sourceFile(string)
> #5
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(751):
> DatabaseUpdater->applyPatch(string, boolean, string)
> #6
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(482):
> DatabaseUpdater->addField(string, string, string)
> #7
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(446):
> DatabaseUpdater->runUpdates(array, boolean)
> #8 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(200):
> DatabaseUpdater->doUpdates(array)
> #9 /var/www/gpf/mediawiki-1.31.0/maintenance/doMaintenance.php(94):
> UpdateMediaWiki->execute()
> #10 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(245):
> require_once(string)
> #11 {main}
> =============
>
> The "ALTER command denied to user 'wikiadmin'@'localhost' for table
> 'ipblocks'" error shouldn't be a permissions issue; "wikiadmin" has full
> permissions to the DB.
>
> However, as stated in my second message, column ipb_id already exists on
> ipblocks as of my MW 1.30.0 install.  It could be barfing on the ALTER ADD
> because the column already exists.
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
> On Thu, Jun 14, 2018 at 1:35 PM Ryan Schmidt <[hidden email]> wrote:
>
>> The update is failing for some reason. If you re-run the update.php script
>> with those two settings in LocalSettings.php, it will give you the exact
>> error message for what failed. With that info, we should be able to figure
>> out what is going on and therefore what steps need to be taken to make the
>> upgrade successful.
>>
>> Reply back with the error message from update.php once you have it.
>>
>> > On Jun 14, 2018, at 9:23 AM, Jeff Darlington <[hidden email]>
>> wrote:
>> >
>> > My current setup, under which MW is running swimmingly:
>> >
>> > Fedora 27
>> > Apache 2.4.33
>> > MariaDB 10.2.14
>> > MediaWiki 1.30.0
>> >
>> > I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball into a
>> > fresh directory, copied over my LocalSettings.php file, and changed the
>> > symlink that I use with Apache to point to the new location.  I then
>> > attempted to run maintenance/update.php and it cryptically ended with a
>> > whimper:
>> >
>> > ====================
>> > MediaWiki 1.31.0 Updater
>> >
>> > Your composer.lock file is up to date with current dependencies!
>> > Going to run database updates for wikidb
>> > Depending on the size of your database this may take a while!
>> > Abort with control-c in the next five seconds (skip this countdown with
>> > --quick) ... 0
>> > Turning off Content Handler DB fields for this part of upgrade.
>> > Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails =
>> > true; and $wgShowDBErrorBacktrace = true; at the bottom of
>> > LocalSettings.php to show detailed debugging information.
>> > ====================
>> >
>> > I added the suggested flags to LocalSettings and got the following in my
>> > browser:
>> >
>> > ====================
>> >
>> > [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page
>> Wikimedia\Rdbms\DBQueryError
>> > from line 1457 of
>> > /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
>> A
>> > database query error has occurred. Did you forget to run your
>> application's
>> > database schema updater after upgrading?
>> > Query: SELECT
>> >
>> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
>> > FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
>> > Function: User::loadFromDatabase
>> > Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for
>> table
>> > 'user' (localhost)
>> >
>> > Backtrace:
>> >
>> > #0
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
>> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>> > string)
>> > #1
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
>> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>> string,
>> > boolean)
>> > #2
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
>> > Wikimedia\Rdbms\Database->query(string, string)
>> > #3
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
>> > Wikimedia\Rdbms\Database->select(array, array, array, string, array,
>> array)
>> > #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
>> > Wikimedia\Rdbms\Database->selectRow(array, array, array, string, array,
>> > array)
>> > #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
>> > User->loadFromDatabase(integer)
>> > #6
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
>> > User->{closure}(boolean, integer, array, NULL)
>> > #7
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
>> > WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
>> > #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
>> > WANObjectCache->getWithSetCallback(string, integer, Closure, array)
>> > #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
>> > User->loadFromCache()
>> > #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
>> > User->loadFromId(integer)
>> > #11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
>> > User->load()
>> > #12
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
>> > MediaWiki\Session\UserInfo::newFromId(string)
>> > #13
>> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
>> > MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
>> > #14
>> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
>> > MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
>> > #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
>> > MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
>> > #16
>> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
>> > WebRequest->getSession()
>> > #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
>> > MediaWiki\Session\SessionManager::getGlobalSession()
>> > #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
>> > require_once(string)
>> > #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
>> > #20 {main}
>> >
>> > ====================
>> > Needless to say, I'm pretty confused here.  Nothing has changed to my
>> > configuration (and probably to the wiki's contents) since I successfully
>> > upgraded to 1.30.0.  If I switch my symlink back to point to my MW 1.30.0
>> > install, the site loads just fine.  So it appears the updater is bombing
>> > when it tries to add the field "ipb_id" to table "ipblocks".
>> >
>> > What confuses me is the "SELECT command denied to user 'wikiuser'@
>> 'localhost'"
>> > error.  My wiki has two MariaDB users:  "wikuser" (the standard user set
>> in
>> > $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user
>> account
>> > has changed, either in the DB or in LocalSettings.
>> >
>> > It *almost* looks like the updater is trying to use the standard user to
>> do
>> > admin functions, but even that doesn't make much sense.  "wikiuser" has
>> > SELECT access to all tables in the DB, while the admin user has all
>> > permissions to the entire DB.  So I don't see why that specific error
>> would
>> > crop up; even "wikiuser" should be able to perform a simple SELECT.
>> >
>> > Fortunately, I can switch back to MW 1.30.0 pretty easily, but I thought
>> I
>> > ought to report the problem.
>> >
>> > ADDENDUM:  I just noticed the following in the 1.31 release notes:
>> >
>> > ====================
>> > Important pre-upgrade notes for 1.31
>> >
>> >   - If you're using MySQL, SQLite, or MSSQL, are not using update.php to
>> >   apply schema changes, and cannot have downtime to run
>> >   migrateArchiveText.php and apply patch-drop-ar_text.sql manually,
>> you'll
>> >   have to apply a default value to the ar_text and ar_flags columns of
>> the
>> >   archive table or make those columns nullable before upgrading to
>> MediaWiki
>> >   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to do
>> this
>> >   for MySQL.
>> >
>> > ====================
>> > Based on this, I think there's something screwy with update.php.  I *am*
>> > using update.php to apply schema changes, but I'm guessing it's not
>> working
>> > correctly.  I have *not* tried this manual fix (and would prefer not to
>> > unless absolutely necessary).
>> >
>> > Jeffrey T. Darlington
>> > General Protection Fault
>> > https://www.gpf-comics.com/
>> > _______________________________________________
>> > MediaWiki-l mailing list
>> > To unsubscribe, go to:
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
As previously stated, the admin user has full privileges to the wiki DB:

> show grants for 'wikiadmin'@'localhost';
GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'

The database is on the same box as the Web server, so localhost ought to
work.  Also as previously stated, none of these attributes have changed on
this box since MW 1.30.0, which is currently running without incident.

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/



On Thu, Jun 14, 2018 at 3:36 PM Brian Wolff <[hidden email]> wrote:

> The error should be different if it was due to the column already existing
>
> Are you sure that wikiadmin has full permissions (Check to make sure
> that the permissions are for the right db, as well as for the right
> host).
>
> --
> Brian
>
> On Thu, Jun 14, 2018 at 5:43 PM, Jeff Darlington
> <[hidden email]> wrote:
> > I could have sworn I had those to variables added when I tried running
> it a
> > second time, but I guess I didn't.  Here's the updated output:
> >
> > =============
> > MediaWiki 1.31.0 Updater
> >
> > Your composer.lock file is up to date with current dependencies!
> > Going to run database updates for wikidb
> > Depending on the size of your database this may take a while!
> > Abort with control-c in the next five seconds (skip this countdown with
> > --quick) ... 0
> > Turning off Content Handler DB fields for this part of upgrade.
> > Adding ipb_id field to table ipblocks ...[ff08e486f9ef856d82769935] [no
> > req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
> > /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
> A
> > database query error has occurred. Did you forget to run your
> application's
> > database schema updater after upgrading?
> > Query: ALTER TABLE `mediawiki`.`ipblocks`
> >  ADD ipb_auto tinyint NOT NULL default '0',
> >  ADD ipb_id int NOT NULL auto_increment,
> >  ADD PRIMARY KEY (ipb_id)
> >
> > Function: Wikimedia\Rdbms\Database::sourceFile(
> > /var/www/gpf/mediawiki-1.31.0/maintenance/archives/patch-ipblocks.sql )
> > Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
> table
> > 'ipblocks' (localhost)
> >
> > Backtrace:
> > #0
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> > string)
> > #1
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
> string,
> > boolean)
> > #2
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4194):
> > Wikimedia\Rdbms\Database->query(string, string)
> > #3
> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4129):
> > Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
> > NULL)
> > #4
> >
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(683):
> > Wikimedia\Rdbms\Database->sourceFile(string)
> > #5
> >
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(751):
> > DatabaseUpdater->applyPatch(string, boolean, string)
> > #6
> >
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(482):
> > DatabaseUpdater->addField(string, string, string)
> > #7
> >
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(446):
> > DatabaseUpdater->runUpdates(array, boolean)
> > #8 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(200):
> > DatabaseUpdater->doUpdates(array)
> > #9 /var/www/gpf/mediawiki-1.31.0/maintenance/doMaintenance.php(94):
> > UpdateMediaWiki->execute()
> > #10 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(245):
> > require_once(string)
> > #11 {main}
> > =============
> >
> > The "ALTER command denied to user 'wikiadmin'@'localhost' for table
> > 'ipblocks'" error shouldn't be a permissions issue; "wikiadmin" has full
> > permissions to the DB.
> >
> > However, as stated in my second message, column ipb_id already exists on
> > ipblocks as of my MW 1.30.0 install.  It could be barfing on the ALTER
> ADD
> > because the column already exists.
> >
> > Jeffrey T. Darlington
> > General Protection Fault
> > https://www.gpf-comics.com/
> >
> >
> > On Thu, Jun 14, 2018 at 1:35 PM Ryan Schmidt <[hidden email]> wrote:
> >
> >> The update is failing for some reason. If you re-run the update.php
> script
> >> with those two settings in LocalSettings.php, it will give you the exact
> >> error message for what failed. With that info, we should be able to
> figure
> >> out what is going on and therefore what steps need to be taken to make
> the
> >> upgrade successful.
> >>
> >> Reply back with the error message from update.php once you have it.
> >>
> >> > On Jun 14, 2018, at 9:23 AM, Jeff Darlington <
> [hidden email]>
> >> wrote:
> >> >
> >> > My current setup, under which MW is running swimmingly:
> >> >
> >> > Fedora 27
> >> > Apache 2.4.33
> >> > MariaDB 10.2.14
> >> > MediaWiki 1.30.0
> >> >
> >> > I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball into
> a
> >> > fresh directory, copied over my LocalSettings.php file, and changed
> the
> >> > symlink that I use with Apache to point to the new location.  I then
> >> > attempted to run maintenance/update.php and it cryptically ended with
> a
> >> > whimper:
> >> >
> >> > ====================
> >> > MediaWiki 1.31.0 Updater
> >> >
> >> > Your composer.lock file is up to date with current dependencies!
> >> > Going to run database updates for wikidb
> >> > Depending on the size of your database this may take a while!
> >> > Abort with control-c in the next five seconds (skip this countdown
> with
> >> > --quick) ... 0
> >> > Turning off Content Handler DB fields for this part of upgrade.
> >> > Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails =
> >> > true; and $wgShowDBErrorBacktrace = true; at the bottom of
> >> > LocalSettings.php to show detailed debugging information.
> >> > ====================
> >> >
> >> > I added the suggested flags to LocalSettings and got the following in
> my
> >> > browser:
> >> >
> >> > ====================
> >> >
> >> > [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page
> >> Wikimedia\Rdbms\DBQueryError
> >> > from line 1457 of
> >> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
> >> A
> >> > database query error has occurred. Did you forget to run your
> >> application's
> >> > database schema updater after upgrading?
> >> > Query: SELECT
> >> >
> >>
> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
> >> > FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
> >> > Function: User::loadFromDatabase
> >> > Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for
> >> table
> >> > 'user' (localhost)
> >> >
> >> > Backtrace:
> >> >
> >> > #0
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
> >> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> >> > string)
> >> > #1
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
> >> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
> >> string,
> >> > boolean)
> >> > #2
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
> >> > Wikimedia\Rdbms\Database->query(string, string)
> >> > #3
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
> >> > Wikimedia\Rdbms\Database->select(array, array, array, string, array,
> >> array)
> >> > #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
> >> > Wikimedia\Rdbms\Database->selectRow(array, array, array, string,
> array,
> >> > array)
> >> > #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
> >> > User->loadFromDatabase(integer)
> >> > #6
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
> >> > User->{closure}(boolean, integer, array, NULL)
> >> > #7
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
> >> > WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
> >> > #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
> >> > WANObjectCache->getWithSetCallback(string, integer, Closure, array)
> >> > #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
> >> > User->loadFromCache()
> >> > #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
> >> > User->loadFromId(integer)
> >> > #11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
> >> > User->load()
> >> > #12
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
> >> > MediaWiki\Session\UserInfo::newFromId(string)
> >> > #13
> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
> >> >
> MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
> >> > #14
> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
> >> > MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
> >> > #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
> >> > MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
> >> > #16
> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
> >> > WebRequest->getSession()
> >> > #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
> >> > MediaWiki\Session\SessionManager::getGlobalSession()
> >> > #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
> >> > require_once(string)
> >> > #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
> >> > #20 {main}
> >> >
> >> > ====================
> >> > Needless to say, I'm pretty confused here.  Nothing has changed to my
> >> > configuration (and probably to the wiki's contents) since I
> successfully
> >> > upgraded to 1.30.0.  If I switch my symlink back to point to my MW
> 1.30.0
> >> > install, the site loads just fine.  So it appears the updater is
> bombing
> >> > when it tries to add the field "ipb_id" to table "ipblocks".
> >> >
> >> > What confuses me is the "SELECT command denied to user 'wikiuser'@
> >> 'localhost'"
> >> > error.  My wiki has two MariaDB users:  "wikuser" (the standard user
> set
> >> in
> >> > $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user
> >> account
> >> > has changed, either in the DB or in LocalSettings.
> >> >
> >> > It *almost* looks like the updater is trying to use the standard user
> to
> >> do
> >> > admin functions, but even that doesn't make much sense.  "wikiuser"
> has
> >> > SELECT access to all tables in the DB, while the admin user has all
> >> > permissions to the entire DB.  So I don't see why that specific error
> >> would
> >> > crop up; even "wikiuser" should be able to perform a simple SELECT.
> >> >
> >> > Fortunately, I can switch back to MW 1.30.0 pretty easily, but I
> thought
> >> I
> >> > ought to report the problem.
> >> >
> >> > ADDENDUM:  I just noticed the following in the 1.31 release notes:
> >> >
> >> > ====================
> >> > Important pre-upgrade notes for 1.31
> >> >
> >> >   - If you're using MySQL, SQLite, or MSSQL, are not using update.php
> to
> >> >   apply schema changes, and cannot have downtime to run
> >> >   migrateArchiveText.php and apply patch-drop-ar_text.sql manually,
> >> you'll
> >> >   have to apply a default value to the ar_text and ar_flags columns of
> >> the
> >> >   archive table or make those columns nullable before upgrading to
> >> MediaWiki
> >> >   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to
> do
> >> this
> >> >   for MySQL.
> >> >
> >> > ====================
> >> > Based on this, I think there's something screwy with update.php.  I
> *am*
> >> > using update.php to apply schema changes, but I'm guessing it's not
> >> working
> >> > correctly.  I have *not* tried this manual fix (and would prefer not
> to
> >> > unless absolutely necessary).
> >> >
> >> > Jeffrey T. Darlington
> >> > General Protection Fault
> >> > https://www.gpf-comics.com/
> >> > _______________________________________________
> >> > MediaWiki-l mailing list
> >> > To unsubscribe, go to:
> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>
> >> _______________________________________________
> >> MediaWiki-l mailing list
> >> To unsubscribe, go to:
> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Brian Wolff
Umm, your error message states that mediawiki thinks the database name
is "mediawiki" not "wikidb".

--
Brian

On Thu, Jun 14, 2018 at 7:47 PM, Jeff Darlington
<[hidden email]> wrote:

> As previously stated, the admin user has full privileges to the wiki DB:
>
>> show grants for 'wikiadmin'@'localhost';
> GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
>
> The database is on the same box as the Web server, so localhost ought to
> work.  Also as previously stated, none of these attributes have changed on
> this box since MW 1.30.0, which is currently running without incident.
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
>
> On Thu, Jun 14, 2018 at 3:36 PM Brian Wolff <[hidden email]> wrote:
>
>> The error should be different if it was due to the column already existing
>>
>> Are you sure that wikiadmin has full permissions (Check to make sure
>> that the permissions are for the right db, as well as for the right
>> host).
>>
>> --
>> Brian
>>
>> On Thu, Jun 14, 2018 at 5:43 PM, Jeff Darlington
>> <[hidden email]> wrote:
>> > I could have sworn I had those to variables added when I tried running
>> it a
>> > second time, but I guess I didn't.  Here's the updated output:
>> >
>> > =============
>> > MediaWiki 1.31.0 Updater
>> >
>> > Your composer.lock file is up to date with current dependencies!
>> > Going to run database updates for wikidb
>> > Depending on the size of your database this may take a while!
>> > Abort with control-c in the next five seconds (skip this countdown with
>> > --quick) ... 0
>> > Turning off Content Handler DB fields for this part of upgrade.
>> > Adding ipb_id field to table ipblocks ...[ff08e486f9ef856d82769935] [no
>> > req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
>> > /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
>> A
>> > database query error has occurred. Did you forget to run your
>> application's
>> > database schema updater after upgrading?
>> > Query: ALTER TABLE `mediawiki`.`ipblocks`
>> >  ADD ipb_auto tinyint NOT NULL default '0',
>> >  ADD ipb_id int NOT NULL auto_increment,
>> >  ADD PRIMARY KEY (ipb_id)
>> >
>> > Function: Wikimedia\Rdbms\Database::sourceFile(
>> > /var/www/gpf/mediawiki-1.31.0/maintenance/archives/patch-ipblocks.sql )
>> > Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
>> table
>> > 'ipblocks' (localhost)
>> >
>> > Backtrace:
>> > #0
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
>> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>> > string)
>> > #1
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
>> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>> string,
>> > boolean)
>> > #2
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4194):
>> > Wikimedia\Rdbms\Database->query(string, string)
>> > #3
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4129):
>> > Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
>> > NULL)
>> > #4
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(683):
>> > Wikimedia\Rdbms\Database->sourceFile(string)
>> > #5
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(751):
>> > DatabaseUpdater->applyPatch(string, boolean, string)
>> > #6
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(482):
>> > DatabaseUpdater->addField(string, string, string)
>> > #7
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(446):
>> > DatabaseUpdater->runUpdates(array, boolean)
>> > #8 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(200):
>> > DatabaseUpdater->doUpdates(array)
>> > #9 /var/www/gpf/mediawiki-1.31.0/maintenance/doMaintenance.php(94):
>> > UpdateMediaWiki->execute()
>> > #10 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(245):
>> > require_once(string)
>> > #11 {main}
>> > =============
>> >
>> > The "ALTER command denied to user 'wikiadmin'@'localhost' for table
>> > 'ipblocks'" error shouldn't be a permissions issue; "wikiadmin" has full
>> > permissions to the DB.
>> >
>> > However, as stated in my second message, column ipb_id already exists on
>> > ipblocks as of my MW 1.30.0 install.  It could be barfing on the ALTER
>> ADD
>> > because the column already exists.
>> >
>> > Jeffrey T. Darlington
>> > General Protection Fault
>> > https://www.gpf-comics.com/
>> >
>> >
>> > On Thu, Jun 14, 2018 at 1:35 PM Ryan Schmidt <[hidden email]> wrote:
>> >
>> >> The update is failing for some reason. If you re-run the update.php
>> script
>> >> with those two settings in LocalSettings.php, it will give you the exact
>> >> error message for what failed. With that info, we should be able to
>> figure
>> >> out what is going on and therefore what steps need to be taken to make
>> the
>> >> upgrade successful.
>> >>
>> >> Reply back with the error message from update.php once you have it.
>> >>
>> >> > On Jun 14, 2018, at 9:23 AM, Jeff Darlington <
>> [hidden email]>
>> >> wrote:
>> >> >
>> >> > My current setup, under which MW is running swimmingly:
>> >> >
>> >> > Fedora 27
>> >> > Apache 2.4.33
>> >> > MariaDB 10.2.14
>> >> > MediaWiki 1.30.0
>> >> >
>> >> > I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball into
>> a
>> >> > fresh directory, copied over my LocalSettings.php file, and changed
>> the
>> >> > symlink that I use with Apache to point to the new location.  I then
>> >> > attempted to run maintenance/update.php and it cryptically ended with
>> a
>> >> > whimper:
>> >> >
>> >> > ====================
>> >> > MediaWiki 1.31.0 Updater
>> >> >
>> >> > Your composer.lock file is up to date with current dependencies!
>> >> > Going to run database updates for wikidb
>> >> > Depending on the size of your database this may take a while!
>> >> > Abort with control-c in the next five seconds (skip this countdown
>> with
>> >> > --quick) ... 0
>> >> > Turning off Content Handler DB fields for this part of upgrade.
>> >> > Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails =
>> >> > true; and $wgShowDBErrorBacktrace = true; at the bottom of
>> >> > LocalSettings.php to show detailed debugging information.
>> >> > ====================
>> >> >
>> >> > I added the suggested flags to LocalSettings and got the following in
>> my
>> >> > browser:
>> >> >
>> >> > ====================
>> >> >
>> >> > [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page
>> >> Wikimedia\Rdbms\DBQueryError
>> >> > from line 1457 of
>> >> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
>> >> A
>> >> > database query error has occurred. Did you forget to run your
>> >> application's
>> >> > database schema updater after upgrading?
>> >> > Query: SELECT
>> >> >
>> >>
>> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
>> >> > FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
>> >> > Function: User::loadFromDatabase
>> >> > Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for
>> >> table
>> >> > 'user' (localhost)
>> >> >
>> >> > Backtrace:
>> >> >
>> >> > #0
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
>> >> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>> >> > string)
>> >> > #1
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
>> >> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>> >> string,
>> >> > boolean)
>> >> > #2
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
>> >> > Wikimedia\Rdbms\Database->query(string, string)
>> >> > #3
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
>> >> > Wikimedia\Rdbms\Database->select(array, array, array, string, array,
>> >> array)
>> >> > #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
>> >> > Wikimedia\Rdbms\Database->selectRow(array, array, array, string,
>> array,
>> >> > array)
>> >> > #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
>> >> > User->loadFromDatabase(integer)
>> >> > #6
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
>> >> > User->{closure}(boolean, integer, array, NULL)
>> >> > #7
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
>> >> > WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
>> >> > #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
>> >> > WANObjectCache->getWithSetCallback(string, integer, Closure, array)
>> >> > #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
>> >> > User->loadFromCache()
>> >> > #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
>> >> > User->loadFromId(integer)
>> >> > #11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
>> >> > User->load()
>> >> > #12
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
>> >> > MediaWiki\Session\UserInfo::newFromId(string)
>> >> > #13
>> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
>> >> >
>> MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
>> >> > #14
>> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
>> >> > MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
>> >> > #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
>> >> > MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
>> >> > #16
>> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
>> >> > WebRequest->getSession()
>> >> > #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
>> >> > MediaWiki\Session\SessionManager::getGlobalSession()
>> >> > #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
>> >> > require_once(string)
>> >> > #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
>> >> > #20 {main}
>> >> >
>> >> > ====================
>> >> > Needless to say, I'm pretty confused here.  Nothing has changed to my
>> >> > configuration (and probably to the wiki's contents) since I
>> successfully
>> >> > upgraded to 1.30.0.  If I switch my symlink back to point to my MW
>> 1.30.0
>> >> > install, the site loads just fine.  So it appears the updater is
>> bombing
>> >> > when it tries to add the field "ipb_id" to table "ipblocks".
>> >> >
>> >> > What confuses me is the "SELECT command denied to user 'wikiuser'@
>> >> 'localhost'"
>> >> > error.  My wiki has two MariaDB users:  "wikuser" (the standard user
>> set
>> >> in
>> >> > $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user
>> >> account
>> >> > has changed, either in the DB or in LocalSettings.
>> >> >
>> >> > It *almost* looks like the updater is trying to use the standard user
>> to
>> >> do
>> >> > admin functions, but even that doesn't make much sense.  "wikiuser"
>> has
>> >> > SELECT access to all tables in the DB, while the admin user has all
>> >> > permissions to the entire DB.  So I don't see why that specific error
>> >> would
>> >> > crop up; even "wikiuser" should be able to perform a simple SELECT.
>> >> >
>> >> > Fortunately, I can switch back to MW 1.30.0 pretty easily, but I
>> thought
>> >> I
>> >> > ought to report the problem.
>> >> >
>> >> > ADDENDUM:  I just noticed the following in the 1.31 release notes:
>> >> >
>> >> > ====================
>> >> > Important pre-upgrade notes for 1.31
>> >> >
>> >> >   - If you're using MySQL, SQLite, or MSSQL, are not using update.php
>> to
>> >> >   apply schema changes, and cannot have downtime to run
>> >> >   migrateArchiveText.php and apply patch-drop-ar_text.sql manually,
>> >> you'll
>> >> >   have to apply a default value to the ar_text and ar_flags columns of
>> >> the
>> >> >   archive table or make those columns nullable before upgrading to
>> >> MediaWiki
>> >> >   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to
>> do
>> >> this
>> >> >   for MySQL.
>> >> >
>> >> > ====================
>> >> > Based on this, I think there's something screwy with update.php.  I
>> *am*
>> >> > using update.php to apply schema changes, but I'm guessing it's not
>> >> working
>> >> > correctly.  I have *not* tried this manual fix (and would prefer not
>> to
>> >> > unless absolutely necessary).
>> >> >
>> >> > Jeffrey T. Darlington
>> >> > General Protection Fault
>> >> > https://www.gpf-comics.com/
>> >> > _______________________________________________
>> >> > MediaWiki-l mailing list
>> >> > To unsubscribe, go to:
>> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> >>
>> >> _______________________________________________
>> >> MediaWiki-l mailing list
>> >> To unsubscribe, go to:
>> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> >>
>> > _______________________________________________
>> > MediaWiki-l mailing list
>> > To unsubscribe, go to:
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
Then methinks maintenance/update.php in MW 1.31.0 isn't honoring
$wgDBname.  From LocalSettings.php:

$wgDBname = "wikidb";

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/

On Thu, Jun 14, 2018 at 4:04 PM Brian Wolff <[hidden email]> wrote:

> Umm, your error message states that mediawiki thinks the database name
> is "mediawiki" not "wikidb".
>
> --
> Brian
>
> On Thu, Jun 14, 2018 at 7:47 PM, Jeff Darlington
> <[hidden email]> wrote:
> > As previously stated, the admin user has full privileges to the wiki DB:
> >
> >> show grants for 'wikiadmin'@'localhost';
> > GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
> >
> > The database is on the same box as the Web server, so localhost ought to
> > work.  Also as previously stated, none of these attributes have changed
> on
> > this box since MW 1.30.0, which is currently running without incident.
> >
> > Jeffrey T. Darlington
> > General Protection Fault
> > https://www.gpf-comics.com/
> >
> >
> >
> > On Thu, Jun 14, 2018 at 3:36 PM Brian Wolff <[hidden email]> wrote:
> >
> >> The error should be different if it was due to the column already
> existing
> >>
> >> Are you sure that wikiadmin has full permissions (Check to make sure
> >> that the permissions are for the right db, as well as for the right
> >> host).
> >>
> >> --
> >> Brian
> >>
> >> On Thu, Jun 14, 2018 at 5:43 PM, Jeff Darlington
> >> <[hidden email]> wrote:
> >> > I could have sworn I had those to variables added when I tried running
> >> it a
> >> > second time, but I guess I didn't.  Here's the updated output:
> >> >
> >> > =============
> >> > MediaWiki 1.31.0 Updater
> >> >
> >> > Your composer.lock file is up to date with current dependencies!
> >> > Going to run database updates for wikidb
> >> > Depending on the size of your database this may take a while!
> >> > Abort with control-c in the next five seconds (skip this countdown
> with
> >> > --quick) ... 0
> >> > Turning off Content Handler DB fields for this part of upgrade.
> >> > Adding ipb_id field to table ipblocks ...[ff08e486f9ef856d82769935]
> [no
> >> > req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
> >> >
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
> >> A
> >> > database query error has occurred. Did you forget to run your
> >> application's
> >> > database schema updater after upgrading?
> >> > Query: ALTER TABLE `mediawiki`.`ipblocks`
> >> >  ADD ipb_auto tinyint NOT NULL default '0',
> >> >  ADD ipb_id int NOT NULL auto_increment,
> >> >  ADD PRIMARY KEY (ipb_id)
> >> >
> >> > Function: Wikimedia\Rdbms\Database::sourceFile(
> >> > /var/www/gpf/mediawiki-1.31.0/maintenance/archives/patch-ipblocks.sql
> )
> >> > Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
> >> table
> >> > 'ipblocks' (localhost)
> >> >
> >> > Backtrace:
> >> > #0
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
> >> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> >> > string)
> >> > #1
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
> >> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
> >> string,
> >> > boolean)
> >> > #2
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4194):
> >> > Wikimedia\Rdbms\Database->query(string, string)
> >> > #3
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4129):
> >> > Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL,
> string,
> >> > NULL)
> >> > #4
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(683):
> >> > Wikimedia\Rdbms\Database->sourceFile(string)
> >> > #5
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(751):
> >> > DatabaseUpdater->applyPatch(string, boolean, string)
> >> > #6
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(482):
> >> > DatabaseUpdater->addField(string, string, string)
> >> > #7
> >> >
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(446):
> >> > DatabaseUpdater->runUpdates(array, boolean)
> >> > #8 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(200):
> >> > DatabaseUpdater->doUpdates(array)
> >> > #9 /var/www/gpf/mediawiki-1.31.0/maintenance/doMaintenance.php(94):
> >> > UpdateMediaWiki->execute()
> >> > #10 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(245):
> >> > require_once(string)
> >> > #11 {main}
> >> > =============
> >> >
> >> > The "ALTER command denied to user 'wikiadmin'@'localhost' for table
> >> > 'ipblocks'" error shouldn't be a permissions issue; "wikiadmin" has
> full
> >> > permissions to the DB.
> >> >
> >> > However, as stated in my second message, column ipb_id already exists
> on
> >> > ipblocks as of my MW 1.30.0 install.  It could be barfing on the ALTER
> >> ADD
> >> > because the column already exists.
> >> >
> >> > Jeffrey T. Darlington
> >> > General Protection Fault
> >> > https://www.gpf-comics.com/
> >> >
> >> >
> >> > On Thu, Jun 14, 2018 at 1:35 PM Ryan Schmidt <[hidden email]>
> wrote:
> >> >
> >> >> The update is failing for some reason. If you re-run the update.php
> >> script
> >> >> with those two settings in LocalSettings.php, it will give you the
> exact
> >> >> error message for what failed. With that info, we should be able to
> >> figure
> >> >> out what is going on and therefore what steps need to be taken to
> make
> >> the
> >> >> upgrade successful.
> >> >>
> >> >> Reply back with the error message from update.php once you have it.
> >> >>
> >> >> > On Jun 14, 2018, at 9:23 AM, Jeff Darlington <
> >> [hidden email]>
> >> >> wrote:
> >> >> >
> >> >> > My current setup, under which MW is running swimmingly:
> >> >> >
> >> >> > Fedora 27
> >> >> > Apache 2.4.33
> >> >> > MariaDB 10.2.14
> >> >> > MediaWiki 1.30.0
> >> >> >
> >> >> > I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball
> into
> >> a
> >> >> > fresh directory, copied over my LocalSettings.php file, and changed
> >> the
> >> >> > symlink that I use with Apache to point to the new location.  I
> then
> >> >> > attempted to run maintenance/update.php and it cryptically ended
> with
> >> a
> >> >> > whimper:
> >> >> >
> >> >> > ====================
> >> >> > MediaWiki 1.31.0 Updater
> >> >> >
> >> >> > Your composer.lock file is up to date with current dependencies!
> >> >> > Going to run database updates for wikidb
> >> >> > Depending on the size of your database this may take a while!
> >> >> > Abort with control-c in the next five seconds (skip this countdown
> >> with
> >> >> > --quick) ... 0
> >> >> > Turning off Content Handler DB fields for this part of upgrade.
> >> >> > Adding ipb_id field to table ipblocks ...Set
> $wgShowExceptionDetails =
> >> >> > true; and $wgShowDBErrorBacktrace = true; at the bottom of
> >> >> > LocalSettings.php to show detailed debugging information.
> >> >> > ====================
> >> >> >
> >> >> > I added the suggested flags to LocalSettings and got the following
> in
> >> my
> >> >> > browser:
> >> >> >
> >> >> > ====================
> >> >> >
> >> >> > [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page
> >> >> Wikimedia\Rdbms\DBQueryError
> >> >> > from line 1457 of
> >> >> >
> >> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
> >> >> A
> >> >> > database query error has occurred. Did you forget to run your
> >> >> application's
> >> >> > database schema updater after upgrading?
> >> >> > Query: SELECT
> >> >> >
> >> >>
> >>
> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
> >> >> > FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
> >> >> > Function: User::loadFromDatabase
> >> >> > Error: 1142 SELECT command denied to user 'wikiuser'@'localhost'
> for
> >> >> table
> >> >> > 'user' (localhost)
> >> >> >
> >> >> > Backtrace:
> >> >> >
> >> >> > #0
> >> >> >
> >> >>
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
> >> >> > Wikimedia\Rdbms\Database->makeQueryException(string, integer,
> string,
> >> >> > string)
> >> >> > #1
> >> >> >
> >> >>
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
> >> >> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
> >> >> string,
> >> >> > boolean)
> >> >> > #2
> >> >> >
> >> >>
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
> >> >> > Wikimedia\Rdbms\Database->query(string, string)
> >> >> > #3
> >> >> >
> >> >>
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
> >> >> > Wikimedia\Rdbms\Database->select(array, array, array, string,
> array,
> >> >> array)
> >> >> > #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
> >> >> > Wikimedia\Rdbms\Database->selectRow(array, array, array, string,
> >> array,
> >> >> > array)
> >> >> > #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
> >> >> > User->loadFromDatabase(integer)
> >> >> > #6
> >> >> >
> >> >>
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
> >> >> > User->{closure}(boolean, integer, array, NULL)
> >> >> > #7
> >> >> >
> >> >>
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
> >> >> > WANObjectCache->doGetWithSetCallback(string, integer, Closure,
> array)
> >> >> > #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
> >> >> > WANObjectCache->getWithSetCallback(string, integer, Closure, array)
> >> >> > #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
> >> >> > User->loadFromCache()
> >> >> > #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
> >> >> > User->loadFromId(integer)
> >> >> > #11
> /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
> >> >> > User->load()
> >> >> > #12
> >> >> >
> >> >>
> >>
> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
> >> >> > MediaWiki\Session\UserInfo::newFromId(string)
> >> >> > #13
> >> >>
> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
> >> >> >
> >> MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
> >> >> > #14
> >> >>
> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
> >> >> >
> MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
> >> >> > #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
> >> >> > MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
> >> >> > #16
> >> >>
> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
> >> >> > WebRequest->getSession()
> >> >> > #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
> >> >> > MediaWiki\Session\SessionManager::getGlobalSession()
> >> >> > #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
> >> >> > require_once(string)
> >> >> > #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
> >> >> > #20 {main}
> >> >> >
> >> >> > ====================
> >> >> > Needless to say, I'm pretty confused here.  Nothing has changed to
> my
> >> >> > configuration (and probably to the wiki's contents) since I
> >> successfully
> >> >> > upgraded to 1.30.0.  If I switch my symlink back to point to my MW
> >> 1.30.0
> >> >> > install, the site loads just fine.  So it appears the updater is
> >> bombing
> >> >> > when it tries to add the field "ipb_id" to table "ipblocks".
> >> >> >
> >> >> > What confuses me is the "SELECT command denied to user 'wikiuser'@
> >> >> 'localhost'"
> >> >> > error.  My wiki has two MariaDB users:  "wikuser" (the standard
> user
> >> set
> >> >> in
> >> >> > $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user
> >> >> account
> >> >> > has changed, either in the DB or in LocalSettings.
> >> >> >
> >> >> > It *almost* looks like the updater is trying to use the standard
> user
> >> to
> >> >> do
> >> >> > admin functions, but even that doesn't make much sense.  "wikiuser"
> >> has
> >> >> > SELECT access to all tables in the DB, while the admin user has all
> >> >> > permissions to the entire DB.  So I don't see why that specific
> error
> >> >> would
> >> >> > crop up; even "wikiuser" should be able to perform a simple SELECT.
> >> >> >
> >> >> > Fortunately, I can switch back to MW 1.30.0 pretty easily, but I
> >> thought
> >> >> I
> >> >> > ought to report the problem.
> >> >> >
> >> >> > ADDENDUM:  I just noticed the following in the 1.31 release notes:
> >> >> >
> >> >> > ====================
> >> >> > Important pre-upgrade notes for 1.31
> >> >> >
> >> >> >   - If you're using MySQL, SQLite, or MSSQL, are not using
> update.php
> >> to
> >> >> >   apply schema changes, and cannot have downtime to run
> >> >> >   migrateArchiveText.php and apply patch-drop-ar_text.sql manually,
> >> >> you'll
> >> >> >   have to apply a default value to the ar_text and ar_flags
> columns of
> >> >> the
> >> >> >   archive table or make those columns nullable before upgrading to
> >> >> MediaWiki
> >> >> >   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how
> to
> >> do
> >> >> this
> >> >> >   for MySQL.
> >> >> >
> >> >> > ====================
> >> >> > Based on this, I think there's something screwy with update.php.  I
> >> *am*
> >> >> > using update.php to apply schema changes, but I'm guessing it's not
> >> >> working
> >> >> > correctly.  I have *not* tried this manual fix (and would prefer
> not
> >> to
> >> >> > unless absolutely necessary).
> >> >> >
> >> >> > Jeffrey T. Darlington
> >> >> > General Protection Fault
> >> >> > https://www.gpf-comics.com/
> >> >> > _______________________________________________
> >> >> > MediaWiki-l mailing list
> >> >> > To unsubscribe, go to:
> >> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >> >>
> >> >> _______________________________________________
> >> >> MediaWiki-l mailing list
> >> >> To unsubscribe, go to:
> >> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >> >>
> >> > _______________________________________________
> >> > MediaWiki-l mailing list
> >> > To unsubscribe, go to:
> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>
> >> _______________________________________________
> >> MediaWiki-l mailing list
> >> To unsubscribe, go to:
> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
In reply to this post by Jeff Darlington
For the record, this problem that I reported back in June still does not
seem to be resolved with MediaWiki 1.31.1.  I am still unable to upgrade to
the 1.31.x branch because the updater script says my wiki admin user
doesn't have the necessary privileges to ALTER table ipblocks.  The
database user account has full privileges to the entire MediaWiki database,
so I have no idea why this error is occurring.  Fortunately, I'm able to
update to MediaWiki 1.30.1 without a problem, but I'd much rather be on the
latest and greatest code base.

My MediaWiki installation is pretty much vanilla except for a single custom
extension that I have eliminated as a possible suspect.  Something has
definitely changed between 1.30.x and 1.31.x, possibly in the updater, that
isn't working.

I'm at a complete loss here.  Any help would be greatly appreciated.

MediaWiki updater output with debugging and tracing turned on:
=====================
MediaWiki 1.31.1 Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for wikidb
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with
--quick) ... 0
Turning off Content Handler DB fields for this part of upgrade.
Adding ipb_id field to table ipblocks ...[6f8054f6cf05b696bf3c9981] [no
req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php: A
database query error has occurred. Did you forget to run your application's
database schema updater after upgrading?
Query: ALTER TABLE `mediawiki`.`ipblocks`
 ADD ipb_auto tinyint NOT NULL default '0',
 ADD ipb_id int NOT NULL auto_increment,
 ADD PRIMARY KEY (ipb_id)

Function: Wikimedia\Rdbms\Database::sourceFile(
/var/www/gpf/mediawiki-1.31.1/maintenance/archives/patch-ipblocks.sql )
Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for table
'ipblocks' (localhost)

Backtrace:
#0
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1427):
Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
string)
#1
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1200):
Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string,
boolean)
#2
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4194):
Wikimedia\Rdbms\Database->query(string, string)
#3
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4129):
Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
NULL)
#4
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(683):
Wikimedia\Rdbms\Database->sourceFile(string)
#5
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(751):
DatabaseUpdater->applyPatch(string, boolean, string)
#6
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(482):
DatabaseUpdater->addField(string, string, string)
#7
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(446):
DatabaseUpdater->runUpdates(array, boolean)
#8 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(200):
DatabaseUpdater->doUpdates(array)
#9 /var/www/gpf/mediawiki-1.31.1/maintenance/doMaintenance.php(94):
UpdateMediaWiki->execute()
#10 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(245):
require_once(string)
#11 {main}
=====================

MariaDB user privileges check:
=====================
> show grants for 'wikiadmin'@'localhost';
GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
=====================

--

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/


On Thu, Jun 14, 2018 at 3:47 PM Jeff Darlington <[hidden email]>
wrote:

> As previously stated, the admin user has full privileges to the wiki DB:
>
> > show grants for 'wikiadmin'@'localhost';
> GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
>
> The database is on the same box as the Web server, so localhost ought to
> work.  Also as previously stated, none of these attributes have changed on
> this box since MW 1.30.0, which is currently running without incident.
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
>
> On Thu, Jun 14, 2018 at 3:36 PM Brian Wolff <[hidden email]> wrote:
>
>> The error should be different if it was due to the column already existing
>>
>> Are you sure that wikiadmin has full permissions (Check to make sure
>> that the permissions are for the right db, as well as for the right
>> host).
>>
>> --
>> Brian
>>
>> On Thu, Jun 14, 2018 at 5:43 PM, Jeff Darlington
>> <[hidden email]> wrote:
>> > I could have sworn I had those to variables added when I tried running
>> it a
>> > second time, but I guess I didn't.  Here's the updated output:
>> >
>> > =============
>> > MediaWiki 1.31.0 Updater
>> >
>> > Your composer.lock file is up to date with current dependencies!
>> > Going to run database updates for wikidb
>> > Depending on the size of your database this may take a while!
>> > Abort with control-c in the next five seconds (skip this countdown with
>> > --quick) ... 0
>> > Turning off Content Handler DB fields for this part of upgrade.
>> > Adding ipb_id field to table ipblocks ...[ff08e486f9ef856d82769935] [no
>> > req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php: A
>> > database query error has occurred. Did you forget to run your
>> application's
>> > database schema updater after upgrading?
>> > Query: ALTER TABLE `mediawiki`.`ipblocks`
>> >  ADD ipb_auto tinyint NOT NULL default '0',
>> >  ADD ipb_id int NOT NULL auto_increment,
>> >  ADD PRIMARY KEY (ipb_id)
>> >
>> > Function: Wikimedia\Rdbms\Database::sourceFile(
>> > /var/www/gpf/mediawiki-1.31.0/maintenance/archives/patch-ipblocks.sql )
>> > Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
>> table
>> > 'ipblocks' (localhost)
>> >
>> > Backtrace:
>> > #0
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
>> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>> > string)
>> > #1
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
>> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>> string,
>> > boolean)
>> > #2
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4194):
>> > Wikimedia\Rdbms\Database->query(string, string)
>> > #3
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4129):
>> > Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
>> > NULL)
>> > #4
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(683):
>> > Wikimedia\Rdbms\Database->sourceFile(string)
>> > #5
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(751):
>> > DatabaseUpdater->applyPatch(string, boolean, string)
>> > #6
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(482):
>> > DatabaseUpdater->addField(string, string, string)
>> > #7
>> >
>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(446):
>> > DatabaseUpdater->runUpdates(array, boolean)
>> > #8 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(200):
>> > DatabaseUpdater->doUpdates(array)
>> > #9 /var/www/gpf/mediawiki-1.31.0/maintenance/doMaintenance.php(94):
>> > UpdateMediaWiki->execute()
>> > #10 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(245):
>> > require_once(string)
>> > #11 {main}
>> > =============
>> >
>> > The "ALTER command denied to user 'wikiadmin'@'localhost' for table
>> > 'ipblocks'" error shouldn't be a permissions issue; "wikiadmin" has full
>> > permissions to the DB.
>> >
>> > However, as stated in my second message, column ipb_id already exists on
>> > ipblocks as of my MW 1.30.0 install.  It could be barfing on the ALTER
>> ADD
>> > because the column already exists.
>> >
>> > Jeffrey T. Darlington
>> > General Protection Fault
>> > https://www.gpf-comics.com/
>> >
>> >
>> > On Thu, Jun 14, 2018 at 1:35 PM Ryan Schmidt <[hidden email]>
>> wrote:
>> >
>> >> The update is failing for some reason. If you re-run the update.php
>> script
>> >> with those two settings in LocalSettings.php, it will give you the
>> exact
>> >> error message for what failed. With that info, we should be able to
>> figure
>> >> out what is going on and therefore what steps need to be taken to make
>> the
>> >> upgrade successful.
>> >>
>> >> Reply back with the error message from update.php once you have it.
>> >>
>> >> > On Jun 14, 2018, at 9:23 AM, Jeff Darlington <
>> [hidden email]>
>> >> wrote:
>> >> >
>> >> > My current setup, under which MW is running swimmingly:
>> >> >
>> >> > Fedora 27
>> >> > Apache 2.4.33
>> >> > MariaDB 10.2.14
>> >> > MediaWiki 1.30.0
>> >> >
>> >> > I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball
>> into a
>> >> > fresh directory, copied over my LocalSettings.php file, and changed
>> the
>> >> > symlink that I use with Apache to point to the new location.  I then
>> >> > attempted to run maintenance/update.php and it cryptically ended
>> with a
>> >> > whimper:
>> >> >
>> >> > ====================
>> >> > MediaWiki 1.31.0 Updater
>> >> >
>> >> > Your composer.lock file is up to date with current dependencies!
>> >> > Going to run database updates for wikidb
>> >> > Depending on the size of your database this may take a while!
>> >> > Abort with control-c in the next five seconds (skip this countdown
>> with
>> >> > --quick) ... 0
>> >> > Turning off Content Handler DB fields for this part of upgrade.
>> >> > Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails
>> =
>> >> > true; and $wgShowDBErrorBacktrace = true; at the bottom of
>> >> > LocalSettings.php to show detailed debugging information.
>> >> > ====================
>> >> >
>> >> > I added the suggested flags to LocalSettings and got the following
>> in my
>> >> > browser:
>> >> >
>> >> > ====================
>> >> >
>> >> > [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page
>> >> Wikimedia\Rdbms\DBQueryError
>> >> > from line 1457 of
>> >> >
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
>> >> A
>> >> > database query error has occurred. Did you forget to run your
>> >> application's
>> >> > database schema updater after upgrading?
>> >> > Query: SELECT
>> >> >
>> >>
>> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
>> >> > FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
>> >> > Function: User::loadFromDatabase
>> >> > Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for
>> >> table
>> >> > 'user' (localhost)
>> >> >
>> >> > Backtrace:
>> >> >
>> >> > #0
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
>> >> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>> >> > string)
>> >> > #1
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
>> >> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>> >> string,
>> >> > boolean)
>> >> > #2
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
>> >> > Wikimedia\Rdbms\Database->query(string, string)
>> >> > #3
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
>> >> > Wikimedia\Rdbms\Database->select(array, array, array, string, array,
>> >> array)
>> >> > #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
>> >> > Wikimedia\Rdbms\Database->selectRow(array, array, array, string,
>> array,
>> >> > array)
>> >> > #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
>> >> > User->loadFromDatabase(integer)
>> >> > #6
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
>> >> > User->{closure}(boolean, integer, array, NULL)
>> >> > #7
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
>> >> > WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
>> >> > #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
>> >> > WANObjectCache->getWithSetCallback(string, integer, Closure, array)
>> >> > #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
>> >> > User->loadFromCache()
>> >> > #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
>> >> > User->loadFromId(integer)
>> >> > #11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
>> >> > User->load()
>> >> > #12
>> >> >
>> >>
>> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
>> >> > MediaWiki\Session\UserInfo::newFromId(string)
>> >> > #13
>> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
>> >> >
>> MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
>> >> > #14
>> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
>> >> >
>> MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
>> >> > #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
>> >> > MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
>> >> > #16
>> >> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
>> >> > WebRequest->getSession()
>> >> > #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
>> >> > MediaWiki\Session\SessionManager::getGlobalSession()
>> >> > #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
>> >> > require_once(string)
>> >> > #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
>> >> > #20 {main}
>> >> >
>> >> > ====================
>> >> > Needless to say, I'm pretty confused here.  Nothing has changed to my
>> >> > configuration (and probably to the wiki's contents) since I
>> successfully
>> >> > upgraded to 1.30.0.  If I switch my symlink back to point to my MW
>> 1.30.0
>> >> > install, the site loads just fine.  So it appears the updater is
>> bombing
>> >> > when it tries to add the field "ipb_id" to table "ipblocks".
>> >> >
>> >> > What confuses me is the "SELECT command denied to user 'wikiuser'@
>> >> 'localhost'"
>> >> > error.  My wiki has two MariaDB users:  "wikuser" (the standard user
>> set
>> >> in
>> >> > $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user
>> >> account
>> >> > has changed, either in the DB or in LocalSettings.
>> >> >
>> >> > It *almost* looks like the updater is trying to use the standard
>> user to
>> >> do
>> >> > admin functions, but even that doesn't make much sense.  "wikiuser"
>> has
>> >> > SELECT access to all tables in the DB, while the admin user has all
>> >> > permissions to the entire DB.  So I don't see why that specific error
>> >> would
>> >> > crop up; even "wikiuser" should be able to perform a simple SELECT.
>> >> >
>> >> > Fortunately, I can switch back to MW 1.30.0 pretty easily, but I
>> thought
>> >> I
>> >> > ought to report the problem.
>> >> >
>> >> > ADDENDUM:  I just noticed the following in the 1.31 release notes:
>> >> >
>> >> > ====================
>> >> > Important pre-upgrade notes for 1.31
>> >> >
>> >> >   - If you're using MySQL, SQLite, or MSSQL, are not using
>> update.php to
>> >> >   apply schema changes, and cannot have downtime to run
>> >> >   migrateArchiveText.php and apply patch-drop-ar_text.sql manually,
>> >> you'll
>> >> >   have to apply a default value to the ar_text and ar_flags columns
>> of
>> >> the
>> >> >   archive table or make those columns nullable before upgrading to
>> >> MediaWiki
>> >> >   1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to
>> do
>> >> this
>> >> >   for MySQL.
>> >> >
>> >> > ====================
>> >> > Based on this, I think there's something screwy with update.php.  I
>> *am*
>> >> > using update.php to apply schema changes, but I'm guessing it's not
>> >> working
>> >> > correctly.  I have *not* tried this manual fix (and would prefer not
>> to
>> >> > unless absolutely necessary).
>> >> >
>> >> > Jeffrey T. Darlington
>> >> > General Protection Fault
>> >> > https://www.gpf-comics.com/
>> >> > _______________________________________________
>> >> > MediaWiki-l mailing list
>> >> > To unsubscribe, go to:
>> >> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> >>
>> >> _______________________________________________
>> >> MediaWiki-l mailing list
>> >> To unsubscribe, go to:
>> >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> >>
>> > _______________________________________________
>> > MediaWiki-l mailing list
>> > To unsubscribe, go to:
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Ryan Schmidt-76
You have permissions on the “wikidb” database but the upgrader is trying to alter a table in the “mediawiki” database. Double check your db settings in LocalSettings.php

--
Ryan Schmidt
Sent from my iPhone

> On Sep 21, 2018, at 6:09 AM, Jeff Darlington <[hidden email]> wrote:
>
> For the record, this problem that I reported back in June still does not
> seem to be resolved with MediaWiki 1.31.1.  I am still unable to upgrade to
> the 1.31.x branch because the updater script says my wiki admin user
> doesn't have the necessary privileges to ALTER table ipblocks.  The
> database user account has full privileges to the entire MediaWiki database,
> so I have no idea why this error is occurring.  Fortunately, I'm able to
> update to MediaWiki 1.30.1 without a problem, but I'd much rather be on the
> latest and greatest code base.
>
> My MediaWiki installation is pretty much vanilla except for a single custom
> extension that I have eliminated as a possible suspect.  Something has
> definitely changed between 1.30.x and 1.31.x, possibly in the updater, that
> isn't working.
>
> I'm at a complete loss here.  Any help would be greatly appreciated.
>
> MediaWiki updater output with debugging and tracing turned on:
> =====================
> MediaWiki 1.31.1 Updater
>
> Your composer.lock file is up to date with current dependencies!
> Going to run database updates for wikidb
> Depending on the size of your database this may take a while!
> Abort with control-c in the next five seconds (skip this countdown with
> --quick) ... 0
> Turning off Content Handler DB fields for this part of upgrade.
> Adding ipb_id field to table ipblocks ...[6f8054f6cf05b696bf3c9981] [no
> req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php: A
> database query error has occurred. Did you forget to run your application's
> database schema updater after upgrading?
> Query: ALTER TABLE `mediawiki`.`ipblocks`
> ADD ipb_auto tinyint NOT NULL default '0',
> ADD ipb_id int NOT NULL auto_increment,
> ADD PRIMARY KEY (ipb_id)
>
> Function: Wikimedia\Rdbms\Database::sourceFile(
> /var/www/gpf/mediawiki-1.31.1/maintenance/archives/patch-ipblocks.sql )
> Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for table
> 'ipblocks' (localhost)
>
> Backtrace:
> #0
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1427):
> Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> string)
> #1
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1200):
> Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string,
> boolean)
> #2
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4194):
> Wikimedia\Rdbms\Database->query(string, string)
> #3
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4129):
> Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
> NULL)
> #4
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(683):
> Wikimedia\Rdbms\Database->sourceFile(string)
> #5
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(751):
> DatabaseUpdater->applyPatch(string, boolean, string)
> #6
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(482):
> DatabaseUpdater->addField(string, string, string)
> #7
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(446):
> DatabaseUpdater->runUpdates(array, boolean)
> #8 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(200):
> DatabaseUpdater->doUpdates(array)
> #9 /var/www/gpf/mediawiki-1.31.1/maintenance/doMaintenance.php(94):
> UpdateMediaWiki->execute()
> #10 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(245):
> require_once(string)
> #11 {main}
> =====================
>
> MariaDB user privileges check:
> =====================
>> show grants for 'wikiadmin'@'localhost';
> GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
> =====================
>
> --
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
> On Thu, Jun 14, 2018 at 3:47 PM Jeff Darlington <[hidden email]>
> wrote:
>
>> As previously stated, the admin user has full privileges to the wiki DB:
>>
>>> show grants for 'wikiadmin'@'localhost';
>> GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
>>
>> The database is on the same box as the Web server, so localhost ought to
>> work.  Also as previously stated, none of these attributes have changed on
>> this box since MW 1.30.0, which is currently running without incident.
>>
>> Jeffrey T. Darlington
>> General Protection Fault
>> https://www.gpf-comics.com/
>>
>>
>>
>>> On Thu, Jun 14, 2018 at 3:36 PM Brian Wolff <[hidden email]> wrote:
>>>
>>> The error should be different if it was due to the column already existing
>>>
>>> Are you sure that wikiadmin has full permissions (Check to make sure
>>> that the permissions are for the right db, as well as for the right
>>> host).
>>>
>>> --
>>> Brian
>>>
>>> On Thu, Jun 14, 2018 at 5:43 PM, Jeff Darlington
>>> <[hidden email]> wrote:
>>>> I could have sworn I had those to variables added when I tried running
>>> it a
>>>> second time, but I guess I didn't.  Here's the updated output:
>>>>
>>>> =============
>>>> MediaWiki 1.31.0 Updater
>>>>
>>>> Your composer.lock file is up to date with current dependencies!
>>>> Going to run database updates for wikidb
>>>> Depending on the size of your database this may take a while!
>>>> Abort with control-c in the next five seconds (skip this countdown with
>>>> --quick) ... 0
>>>> Turning off Content Handler DB fields for this part of upgrade.
>>>> Adding ipb_id field to table ipblocks ...[ff08e486f9ef856d82769935] [no
>>>> req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php: A
>>>> database query error has occurred. Did you forget to run your
>>> application's
>>>> database schema updater after upgrading?
>>>> Query: ALTER TABLE `mediawiki`.`ipblocks`
>>>> ADD ipb_auto tinyint NOT NULL default '0',
>>>> ADD ipb_id int NOT NULL auto_increment,
>>>> ADD PRIMARY KEY (ipb_id)
>>>>
>>>> Function: Wikimedia\Rdbms\Database::sourceFile(
>>>> /var/www/gpf/mediawiki-1.31.0/maintenance/archives/patch-ipblocks.sql )
>>>> Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
>>> table
>>>> 'ipblocks' (localhost)
>>>>
>>>> Backtrace:
>>>> #0
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
>>>> Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>>>> string)
>>>> #1
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
>>>> Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>>> string,
>>>> boolean)
>>>> #2
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4194):
>>>> Wikimedia\Rdbms\Database->query(string, string)
>>>> #3
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(4129):
>>>> Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
>>>> NULL)
>>>> #4
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(683):
>>>> Wikimedia\Rdbms\Database->sourceFile(string)
>>>> #5
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(751):
>>>> DatabaseUpdater->applyPatch(string, boolean, string)
>>>> #6
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(482):
>>>> DatabaseUpdater->addField(string, string, string)
>>>> #7
>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/installer/DatabaseUpdater.php(446):
>>>> DatabaseUpdater->runUpdates(array, boolean)
>>>> #8 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(200):
>>>> DatabaseUpdater->doUpdates(array)
>>>> #9 /var/www/gpf/mediawiki-1.31.0/maintenance/doMaintenance.php(94):
>>>> UpdateMediaWiki->execute()
>>>> #10 /var/www/gpf/mediawiki-1.31.0/maintenance/update.php(245):
>>>> require_once(string)
>>>> #11 {main}
>>>> =============
>>>>
>>>> The "ALTER command denied to user 'wikiadmin'@'localhost' for table
>>>> 'ipblocks'" error shouldn't be a permissions issue; "wikiadmin" has full
>>>> permissions to the DB.
>>>>
>>>> However, as stated in my second message, column ipb_id already exists on
>>>> ipblocks as of my MW 1.30.0 install.  It could be barfing on the ALTER
>>> ADD
>>>> because the column already exists.
>>>>
>>>> Jeffrey T. Darlington
>>>> General Protection Fault
>>>> https://www.gpf-comics.com/
>>>>
>>>>
>>>> On Thu, Jun 14, 2018 at 1:35 PM Ryan Schmidt <[hidden email]>
>>> wrote:
>>>>
>>>>> The update is failing for some reason. If you re-run the update.php
>>> script
>>>>> with those two settings in LocalSettings.php, it will give you the
>>> exact
>>>>> error message for what failed. With that info, we should be able to
>>> figure
>>>>> out what is going on and therefore what steps need to be taken to make
>>> the
>>>>> upgrade successful.
>>>>>
>>>>> Reply back with the error message from update.php once you have it.
>>>>>
>>>>>> On Jun 14, 2018, at 9:23 AM, Jeff Darlington <
>>> [hidden email]>
>>>>> wrote:
>>>>>>
>>>>>> My current setup, under which MW is running swimmingly:
>>>>>>
>>>>>> Fedora 27
>>>>>> Apache 2.4.33
>>>>>> MariaDB 10.2.14
>>>>>> MediaWiki 1.30.0
>>>>>>
>>>>>> I am attempting to upgrade to MW 1.31.0.  I unzipped the tarball
>>> into a
>>>>>> fresh directory, copied over my LocalSettings.php file, and changed
>>> the
>>>>>> symlink that I use with Apache to point to the new location.  I then
>>>>>> attempted to run maintenance/update.php and it cryptically ended
>>> with a
>>>>>> whimper:
>>>>>>
>>>>>> ====================
>>>>>> MediaWiki 1.31.0 Updater
>>>>>>
>>>>>> Your composer.lock file is up to date with current dependencies!
>>>>>> Going to run database updates for wikidb
>>>>>> Depending on the size of your database this may take a while!
>>>>>> Abort with control-c in the next five seconds (skip this countdown
>>> with
>>>>>> --quick) ... 0
>>>>>> Turning off Content Handler DB fields for this part of upgrade.
>>>>>> Adding ipb_id field to table ipblocks ...Set $wgShowExceptionDetails
>>> =
>>>>>> true; and $wgShowDBErrorBacktrace = true; at the bottom of
>>>>>> LocalSettings.php to show detailed debugging information.
>>>>>> ====================
>>>>>>
>>>>>> I added the suggested flags to LocalSettings and got the following
>>> in my
>>>>>> browser:
>>>>>>
>>>>>> ====================
>>>>>>
>>>>>> [WyJ-joCjti3zg1lzHPXHqQAAAAM] /wiki/Main_Page
>>>>> Wikimedia\Rdbms\DBQueryError
>>>>>> from line 1457 of
>>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php:
>>>>> A
>>>>>> database query error has occurred. Did you forget to run your
>>>>> application's
>>>>>> database schema updater after upgrading?
>>>>>> Query: SELECT
>>>>>>
>>>>>
>>> user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount
>>>>>> FROM `mediawiki`.`user` WHERE user_id = '1' LIMIT 1
>>>>>> Function: User::loadFromDatabase
>>>>>> Error: 1142 SELECT command denied to user 'wikiuser'@'localhost' for
>>>>> table
>>>>>> 'user' (localhost)
>>>>>>
>>>>>> Backtrace:
>>>>>>
>>>>>> #0
>>>>>>
>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1427):
>>>>>> Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>>>>>> string)
>>>>>> #1
>>>>>>
>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1200):
>>>>>> Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>>>>> string,
>>>>>> boolean)
>>>>>> #2
>>>>>>
>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1653):
>>>>>> Wikimedia\Rdbms\Database->query(string, string)
>>>>>> #3
>>>>>>
>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(1730):
>>>>>> Wikimedia\Rdbms\Database->select(array, array, array, string, array,
>>>>> array)
>>>>>> #4 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(1407):
>>>>>> Wikimedia\Rdbms\Database->selectRow(array, array, array, string,
>>> array,
>>>>>> array)
>>>>>> #5 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(537):
>>>>>> User->loadFromDatabase(integer)
>>>>>> #6
>>>>>>
>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1240):
>>>>>> User->{closure}(boolean, integer, array, NULL)
>>>>>> #7
>>>>>>
>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/libs/objectcache/WANObjectCache.php(1110):
>>>>>> WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
>>>>>> #8 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(561):
>>>>>> WANObjectCache->getWithSetCallback(string, integer, Closure, array)
>>>>>> #9 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(482):
>>>>>> User->loadFromCache()
>>>>>> #10 /var/www/gpf/mediawiki-1.31.0/includes/user/User.php(420):
>>>>>> User->loadFromId(integer)
>>>>>> #11 /var/www/gpf/mediawiki-1.31.0/includes/session/UserInfo.php(88):
>>>>>> User->load()
>>>>>> #12
>>>>>>
>>>>>
>>> /var/www/gpf/mediawiki-1.31.0/includes/session/CookieSessionProvider.php(119):
>>>>>> MediaWiki\Session\UserInfo::newFromId(string)
>>>>>> #13
>>>>> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(488):
>>>>>>
>>> MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
>>>>>> #14
>>>>> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(191):
>>>>>>
>>> MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
>>>>>> #15 /var/www/gpf/mediawiki-1.31.0/includes/WebRequest.php(736):
>>>>>> MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
>>>>>> #16
>>>>> /var/www/gpf/mediawiki-1.31.0/includes/session/SessionManager.php(130):
>>>>>> WebRequest->getSession()
>>>>>> #17 /var/www/gpf/mediawiki-1.31.0/includes/Setup.php(847):
>>>>>> MediaWiki\Session\SessionManager::getGlobalSession()
>>>>>> #18 /var/www/gpf/mediawiki-1.31.0/includes/WebStart.php(88):
>>>>>> require_once(string)
>>>>>> #19 /var/www/gpf/mediawiki-1.31.0/index.php(39): require(string)
>>>>>> #20 {main}
>>>>>>
>>>>>> ====================
>>>>>> Needless to say, I'm pretty confused here.  Nothing has changed to my
>>>>>> configuration (and probably to the wiki's contents) since I
>>> successfully
>>>>>> upgraded to 1.30.0.  If I switch my symlink back to point to my MW
>>> 1.30.0
>>>>>> install, the site loads just fine.  So it appears the updater is
>>> bombing
>>>>>> when it tries to add the field "ipb_id" to table "ipblocks".
>>>>>>
>>>>>> What confuses me is the "SELECT command denied to user 'wikiuser'@
>>>>> 'localhost'"
>>>>>> error.  My wiki has two MariaDB users:  "wikuser" (the standard user
>>> set
>>>>> in
>>>>>> $wgDBuser) and an admin user set with $wgDBadminuser.  Neither user
>>>>> account
>>>>>> has changed, either in the DB or in LocalSettings.
>>>>>>
>>>>>> It *almost* looks like the updater is trying to use the standard
>>> user to
>>>>> do
>>>>>> admin functions, but even that doesn't make much sense.  "wikiuser"
>>> has
>>>>>> SELECT access to all tables in the DB, while the admin user has all
>>>>>> permissions to the entire DB.  So I don't see why that specific error
>>>>> would
>>>>>> crop up; even "wikiuser" should be able to perform a simple SELECT.
>>>>>>
>>>>>> Fortunately, I can switch back to MW 1.30.0 pretty easily, but I
>>> thought
>>>>> I
>>>>>> ought to report the problem.
>>>>>>
>>>>>> ADDENDUM:  I just noticed the following in the 1.31 release notes:
>>>>>>
>>>>>> ====================
>>>>>> Important pre-upgrade notes for 1.31
>>>>>>
>>>>>>  - If you're using MySQL, SQLite, or MSSQL, are not using
>>> update.php to
>>>>>>  apply schema changes, and cannot have downtime to run
>>>>>>  migrateArchiveText.php and apply patch-drop-ar_text.sql manually,
>>>>> you'll
>>>>>>  have to apply a default value to the ar_text and ar_flags columns
>>> of
>>>>> the
>>>>>>  archive table or make those columns nullable before upgrading to
>>>>> MediaWiki
>>>>>>  1.31. maintenance/archives/patch-nullable-ar_text.sql shows how to
>>> do
>>>>> this
>>>>>>  for MySQL.
>>>>>>
>>>>>> ====================
>>>>>> Based on this, I think there's something screwy with update.php.  I
>>> *am*
>>>>>> using update.php to apply schema changes, but I'm guessing it's not
>>>>> working
>>>>>> correctly.  I have *not* tried this manual fix (and would prefer not
>>> to
>>>>>> unless absolutely necessary).
>>>>>>
>>>>>> Jeffrey T. Darlington
>>>>>> General Protection Fault
>>>>>> https://www.gpf-comics.com/
>>>>>> _______________________________________________
>>>>>> MediaWiki-l mailing list
>>>>>> To unsubscribe, go to:
>>>>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>>>
>>>>> _______________________________________________
>>>>> MediaWiki-l mailing list
>>>>> To unsubscribe, go to:
>>>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>>>
>>>> _______________________________________________
>>>> MediaWiki-l mailing list
>>>> To unsubscribe, go to:
>>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>
>>> _______________________________________________
>>> MediaWiki-l mailing list
>>> To unsubscribe, go to:
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>
>>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
As I stated several months ago, the updater isn't honoring $wgDBname, which
I have explicitly set in LocalSettings.php to "wikidb":

$wgDBname = "wikidb";

--

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/


On Fri, Sep 21, 2018 at 9:36 AM Ryan Schmidt <[hidden email]> wrote:

> You have permissions on the “wikidb” database but the upgrader is trying
> to alter a table in the “mediawiki” database. Double check your db settings
> in LocalSettings.php
>
> --
> Ryan Schmidt
> Sent from my iPhone
>
> > On Sep 21, 2018, at 6:09 AM, Jeff Darlington <[hidden email]>
> wrote:
> >
> > For the record, this problem that I reported back in June still does not
> > seem to be resolved with MediaWiki 1.31.1.  I am still unable to upgrade
> to
> > the 1.31.x branch because the updater script says my wiki admin user
> > doesn't have the necessary privileges to ALTER table ipblocks.  The
> > database user account has full privileges to the entire MediaWiki
> database,
> > so I have no idea why this error is occurring.  Fortunately, I'm able to
> > update to MediaWiki 1.30.1 without a problem, but I'd much rather be on
> the
> > latest and greatest code base.
> >
> > My MediaWiki installation is pretty much vanilla except for a single
> custom
> > extension that I have eliminated as a possible suspect.  Something has
> > definitely changed between 1.30.x and 1.31.x, possibly in the updater,
> that
> > isn't working.
> >
> > I'm at a complete loss here.  Any help would be greatly appreciated.
> >
> > MediaWiki updater output with debugging and tracing turned on:
> > =====================
> > MediaWiki 1.31.1 Updater
> >
> > Your composer.lock file is up to date with current dependencies!
> > Going to run database updates for wikidb
> > Depending on the size of your database this may take a while!
> > Abort with control-c in the next five seconds (skip this countdown with
> > --quick) ... 0
> > Turning off Content Handler DB fields for this part of upgrade.
> > Adding ipb_id field to table ipblocks ...[6f8054f6cf05b696bf3c9981] [no
> > req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
> > /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php:
> A
> > database query error has occurred. Did you forget to run your
> application's
> > database schema updater after upgrading?
> > Query: ALTER TABLE `mediawiki`.`ipblocks`
> > ADD ipb_auto tinyint NOT NULL default '0',
> > ADD ipb_id int NOT NULL auto_increment,
> > ADD PRIMARY KEY (ipb_id)
> >
> > Function: Wikimedia\Rdbms\Database::sourceFile(
> > /var/www/gpf/mediawiki-1.31.1/maintenance/archives/patch-ipblocks.sql )
> > Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
> table
> > 'ipblocks' (localhost)
> >
> > Backtrace:
> > #0
> >
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1427):
> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
> > string)
> > #1
> >
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1200):
> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
> string,
> > boolean)
> > #2
> >
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4194):
> > Wikimedia\Rdbms\Database->query(string, string)
> > #3
> >
> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4129):
> > Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
> > NULL)
> > #4
> >
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(683):
> > Wikimedia\Rdbms\Database->sourceFile(string)
> > #5
> >
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(751):
> > DatabaseUpdater->applyPatch(string, boolean, string)
> > #6
> >
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(482):
> > DatabaseUpdater->addField(string, string, string)
> > #7
> >
> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(446):
> > DatabaseUpdater->runUpdates(array, boolean)
> > #8 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(200):
> > DatabaseUpdater->doUpdates(array)
> > #9 /var/www/gpf/mediawiki-1.31.1/maintenance/doMaintenance.php(94):
> > UpdateMediaWiki->execute()
> > #10 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(245):
> > require_once(string)
> > #11 {main}
> > =====================
> >
> > MariaDB user privileges check:
> > =====================
> >> show grants for 'wikiadmin'@'localhost';
> > GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
> > =====================
> >
> > --
> >
> > Jeffrey T. Darlington
> > General Protection Fault
> > https://www.gpf-comics.com/
>
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

kghbln
This may sound stupid, but are you sure that you are mapping the update
script to the correct "LocalSettings.php" file? Perhaps you moved around
folders at some time. Another thing may be that you have the parameter
twice in your "LocalSettings.php" file and that one value overrides the
other. Apart from that, I do not know what could be the issue.

Cheers

Am 21.09.2018 um 16:28 schrieb Jeff Darlington:
> As I stated several months ago, the updater isn't honoring $wgDBname, which
> I have explicitly set in LocalSettings.php to "wikidb":
>
> $wgDBname = "wikidb";
>


_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Brian Wolff
In reply to this post by Jeff Darlington
Nobody else has reported having a similar issue, and using the default
$wgDBname is pretty rare. I would suggest it is highly likely something
wrong with your config and not something wrong with mediawiki:
E.g. (but not limitted to):
* derriving your db name from the host header or some other part of the
request not present from the command line
* using some sort of complex symlink system for mw files where the command
line ends up reading a different LocalSettings.php than the web would


--
Brian

On Friday, September 21, 2018, Jeff Darlington <[hidden email]>
wrote:
> As I stated several months ago, the updater isn't honoring $wgDBname,
which

> I have explicitly set in LocalSettings.php to "wikidb":
>
> $wgDBname = "wikidb";
>
> --
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
> On Fri, Sep 21, 2018 at 9:36 AM Ryan Schmidt <[hidden email]> wrote:
>
>> You have permissions on the “wikidb” database but the upgrader is trying
>> to alter a table in the “mediawiki” database. Double check your db
settings

>> in LocalSettings.php
>>
>> --
>> Ryan Schmidt
>> Sent from my iPhone
>>
>> > On Sep 21, 2018, at 6:09 AM, Jeff Darlington <[hidden email]
>
>> wrote:
>> >
>> > For the record, this problem that I reported back in June still does
not
>> > seem to be resolved with MediaWiki 1.31.1.  I am still unable to
upgrade
>> to
>> > the 1.31.x branch because the updater script says my wiki admin user
>> > doesn't have the necessary privileges to ALTER table ipblocks.  The
>> > database user account has full privileges to the entire MediaWiki
>> database,
>> > so I have no idea why this error is occurring.  Fortunately, I'm able
to

>> > update to MediaWiki 1.30.1 without a problem, but I'd much rather be on
>> the
>> > latest and greatest code base.
>> >
>> > My MediaWiki installation is pretty much vanilla except for a single
>> custom
>> > extension that I have eliminated as a possible suspect.  Something has
>> > definitely changed between 1.30.x and 1.31.x, possibly in the updater,
>> that
>> > isn't working.
>> >
>> > I'm at a complete loss here.  Any help would be greatly appreciated.
>> >
>> > MediaWiki updater output with debugging and tracing turned on:
>> > =====================
>> > MediaWiki 1.31.1 Updater
>> >
>> > Your composer.lock file is up to date with current dependencies!
>> > Going to run database updates for wikidb
>> > Depending on the size of your database this may take a while!
>> > Abort with control-c in the next five seconds (skip this countdown with
>> > --quick) ... 0
>> > Turning off Content Handler DB fields for this part of upgrade.
>> > Adding ipb_id field to table ipblocks ...[6f8054f6cf05b696bf3c9981] [no
>> > req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
>> >
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php:

>> A
>> > database query error has occurred. Did you forget to run your
>> application's
>> > database schema updater after upgrading?
>> > Query: ALTER TABLE `mediawiki`.`ipblocks`
>> > ADD ipb_auto tinyint NOT NULL default '0',
>> > ADD ipb_id int NOT NULL auto_increment,
>> > ADD PRIMARY KEY (ipb_id)
>> >
>> > Function: Wikimedia\Rdbms\Database::sourceFile(
>> > /var/www/gpf/mediawiki-1.31.1/maintenance/archives/patch-ipblocks.sql )
>> > Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
>> table
>> > 'ipblocks' (localhost)
>> >
>> > Backtrace:
>> > #0
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1427):
>> > Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>> > string)
>> > #1
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1200):
>> > Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>> string,
>> > boolean)
>> > #2
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4194):
>> > Wikimedia\Rdbms\Database->query(string, string)
>> > #3
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4129):
>> > Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL,
string,
>> > NULL)
>> > #4
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(683):
>> > Wikimedia\Rdbms\Database->sourceFile(string)
>> > #5
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(751):
>> > DatabaseUpdater->applyPatch(string, boolean, string)
>> > #6
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(482):
>> > DatabaseUpdater->addField(string, string, string)
>> > #7
>> >
>>
/var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(446):

>> > DatabaseUpdater->runUpdates(array, boolean)
>> > #8 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(200):
>> > DatabaseUpdater->doUpdates(array)
>> > #9 /var/www/gpf/mediawiki-1.31.1/maintenance/doMaintenance.php(94):
>> > UpdateMediaWiki->execute()
>> > #10 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(245):
>> > require_once(string)
>> > #11 {main}
>> > =====================
>> >
>> > MariaDB user privileges check:
>> > =====================
>> >> show grants for 'wikiadmin'@'localhost';
>> > GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
>> > =====================
>> >
>> > --
>> >
>> > Jeffrey T. Darlington
>> > General Protection Fault
>> > https://www.gpf-comics.com/
>>
>>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
In reply to this post by kghbln
I only run one wiki, and the database has been "wikidb" since I first
installed it years ago.  The definition of $wgDBname appears only once in
LocalSettings.php.

When I upgrade I always extract the tarball into a pristine new folder,
then copy over LocalSettings.php and my one extension. I use symlinks to
point to a common external image folder (which has worked better for me
than copying the image folder back and forth all the time) and for the
site's definition in Apache (i.e., Apache points to the symlink "wiki",
which then points to the currently active MediaWiki code base).  When I run
update.php, I always use the raw path rather than the symlink so I know I'm
pointing to the right code.

My guess is that update.php or some script it depends on isn't honoring
$wgDBname.  That said, I can't believe I'm the only person who's using a
custom DB name and thus the only person who is having this problem.

On Fri, Sep 21, 2018 at 10:35 AM [[kgh]] <[hidden email]> wrote:

> This may sound stupid, but are you sure that you are mapping the update
> script to the correct "LocalSettings.php" file? Perhaps you moved around
> folders at some time. Another thing may be that you have the parameter
> twice in your "LocalSettings.php" file and that one value overrides the
> other. Apart from that, I do not know what could be the issue.
>
> Cheers
>
> Am 21.09.2018 um 16:28 schrieb Jeff Darlington:
> > As I stated several months ago, the updater isn't honoring $wgDBname,
> which
> > I have explicitly set in LocalSettings.php to "wikidb":
> >
> > $wgDBname = "wikidb";
> >
>
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

David Daw
Hey Jeff,

Take a look at this and see if this helps
https://www.mediawiki.org/wiki/Topic:Uf63mplrzzuxz0it

$wgDBmwschema  may need to be removed from or corrected in
LocalSettings.php

It's also mentioned here :
https://www.mediawiki.org/wiki/MediaWiki_1.31#Configuration_changes


   - $wgDBmwschema
   <https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDBmwschema> now
   affects all database types. Old MediaWiki versions were setting this to
   'mediawiki' during the installer, which may cause errors during the upgrade
   when your database is not PostgreSQL or MSSQL. In that case, remove this
   setting from LocalSettings.php.


On Fri, Sep 21, 2018 at 9:47 AM Jeff Darlington <[hidden email]>
wrote:

> I only run one wiki, and the database has been "wikidb" since I first
> installed it years ago.  The definition of $wgDBname appears only once in
> LocalSettings.php.
>
> When I upgrade I always extract the tarball into a pristine new folder,
> then copy over LocalSettings.php and my one extension. I use symlinks to
> point to a common external image folder (which has worked better for me
> than copying the image folder back and forth all the time) and for the
> site's definition in Apache (i.e., Apache points to the symlink "wiki",
> which then points to the currently active MediaWiki code base).  When I run
> update.php, I always use the raw path rather than the symlink so I know I'm
> pointing to the right code.
>
> My guess is that update.php or some script it depends on isn't honoring
> $wgDBname.  That said, I can't believe I'm the only person who's using a
> custom DB name and thus the only person who is having this problem.
>
> On Fri, Sep 21, 2018 at 10:35 AM [[kgh]] <[hidden email]> wrote:
>
> > This may sound stupid, but are you sure that you are mapping the update
> > script to the correct "LocalSettings.php" file? Perhaps you moved around
> > folders at some time. Another thing may be that you have the parameter
> > twice in your "LocalSettings.php" file and that one value overrides the
> > other. Apart from that, I do not know what could be the issue.
> >
> > Cheers
> >
> > Am 21.09.2018 um 16:28 schrieb Jeff Darlington:
> > > As I stated several months ago, the updater isn't honoring $wgDBname,
> > which
> > > I have explicitly set in LocalSettings.php to "wikidb":
> > >
> > > $wgDBname = "wikidb";
> > >
> >
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Ryan Schmidt-76
In reply to this post by Jeff Darlington
Then one of the following is likely true (in no particular order):

1. You have the environment variable MW_INSTALL_PATH set in your shell, which is causing the wrong LocalSettings.php to be loaded due to being set to an incorrect path.
2. You are passing --wiki mediawiki to the script somehow (the wiki param lets you specify the db and table prefix to operate on)
3. Your LocalSettings is part of a wikifarm setup and your wiki detection is broken when run from cli
4. You’re defining $wgConf which is overriding your settings with wrong values

Can you check up on all of those? If all else fails, try passing --wiki wikidb into the update script to force it to use the right db.

--
Ryan Schmidt
Sent from my iPhone

> On Sep 21, 2018, at 7:28 AM, Jeff Darlington <[hidden email]> wrote:
>
> As I stated several months ago, the updater isn't honoring $wgDBname, which
> I have explicitly set in LocalSettings.php to "wikidb":
>
> $wgDBname = "wikidb";
>
> --
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
>> On Fri, Sep 21, 2018 at 9:36 AM Ryan Schmidt <[hidden email]> wrote:
>>
>> You have permissions on the “wikidb” database but the upgrader is trying
>> to alter a table in the “mediawiki” database. Double check your db settings
>> in LocalSettings.php
>>
>> --
>> Ryan Schmidt
>> Sent from my iPhone
>>
>>> On Sep 21, 2018, at 6:09 AM, Jeff Darlington <[hidden email]>
>> wrote:
>>>
>>> For the record, this problem that I reported back in June still does not
>>> seem to be resolved with MediaWiki 1.31.1.  I am still unable to upgrade
>> to
>>> the 1.31.x branch because the updater script says my wiki admin user
>>> doesn't have the necessary privileges to ALTER table ipblocks.  The
>>> database user account has full privileges to the entire MediaWiki
>> database,
>>> so I have no idea why this error is occurring.  Fortunately, I'm able to
>>> update to MediaWiki 1.30.1 without a problem, but I'd much rather be on
>> the
>>> latest and greatest code base.
>>>
>>> My MediaWiki installation is pretty much vanilla except for a single
>> custom
>>> extension that I have eliminated as a possible suspect.  Something has
>>> definitely changed between 1.30.x and 1.31.x, possibly in the updater,
>> that
>>> isn't working.
>>>
>>> I'm at a complete loss here.  Any help would be greatly appreciated.
>>>
>>> MediaWiki updater output with debugging and tracing turned on:
>>> =====================
>>> MediaWiki 1.31.1 Updater
>>>
>>> Your composer.lock file is up to date with current dependencies!
>>> Going to run database updates for wikidb
>>> Depending on the size of your database this may take a while!
>>> Abort with control-c in the next five seconds (skip this countdown with
>>> --quick) ... 0
>>> Turning off Content Handler DB fields for this part of upgrade.
>>> Adding ipb_id field to table ipblocks ...[6f8054f6cf05b696bf3c9981] [no
>>> req]   Wikimedia\Rdbms\DBQueryError from line 1457 of
>>> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php:
>> A
>>> database query error has occurred. Did you forget to run your
>> application's
>>> database schema updater after upgrading?
>>> Query: ALTER TABLE `mediawiki`.`ipblocks`
>>> ADD ipb_auto tinyint NOT NULL default '0',
>>> ADD ipb_id int NOT NULL auto_increment,
>>> ADD PRIMARY KEY (ipb_id)
>>>
>>> Function: Wikimedia\Rdbms\Database::sourceFile(
>>> /var/www/gpf/mediawiki-1.31.1/maintenance/archives/patch-ipblocks.sql )
>>> Error: 1142 ALTER command denied to user 'wikiadmin'@'localhost' for
>> table
>>> 'ipblocks' (localhost)
>>>
>>> Backtrace:
>>> #0
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1427):
>>> Wikimedia\Rdbms\Database->makeQueryException(string, integer, string,
>>> string)
>>> #1
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(1200):
>>> Wikimedia\Rdbms\Database->reportQueryError(string, integer, string,
>> string,
>>> boolean)
>>> #2
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4194):
>>> Wikimedia\Rdbms\Database->query(string, string)
>>> #3
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/libs/rdbms/database/Database.php(4129):
>>> Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string,
>>> NULL)
>>> #4
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(683):
>>> Wikimedia\Rdbms\Database->sourceFile(string)
>>> #5
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(751):
>>> DatabaseUpdater->applyPatch(string, boolean, string)
>>> #6
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(482):
>>> DatabaseUpdater->addField(string, string, string)
>>> #7
>>>
>> /var/www/gpf/mediawiki-1.31.1/includes/installer/DatabaseUpdater.php(446):
>>> DatabaseUpdater->runUpdates(array, boolean)
>>> #8 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(200):
>>> DatabaseUpdater->doUpdates(array)
>>> #9 /var/www/gpf/mediawiki-1.31.1/maintenance/doMaintenance.php(94):
>>> UpdateMediaWiki->execute()
>>> #10 /var/www/gpf/mediawiki-1.31.1/maintenance/update.php(245):
>>> require_once(string)
>>> #11 {main}
>>> =====================
>>>
>>> MariaDB user privileges check:
>>> =====================
>>>> show grants for 'wikiadmin'@'localhost';
>>> GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wikiadmin'@'localhost'
>>> =====================
>>>
>>> --
>>>
>>> Jeffrey T. Darlington
>>> General Protection Fault
>>> https://www.gpf-comics.com/
>>
>>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
In reply to this post by David Daw
Actually, that looks suspiciously familiar, and looking at my
LocalSettings.php, $wgDBmwschema *is* present.  I never set it; it's a
default under the "Postgres specific settings" block and has been carried
over from install to install for years. (I have no idea how old that is; I
probably first installed MediaWiki back in 2008, maybe?)  I'll try removing
that and see if that works.

--

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/


On Fri, Sep 21, 2018 at 10:49 AM David Daw <[hidden email]> wrote:

> Hey Jeff,
>
> Take a look at this and see if this helps
> https://www.mediawiki.org/wiki/Topic:Uf63mplrzzuxz0it
>
> $wgDBmwschema  may need to be removed from or corrected in
> LocalSettings.php
>
> It's also mentioned here :
> https://www.mediawiki.org/wiki/MediaWiki_1.31#Configuration_changes
>
>
>    - $wgDBmwschema
>    <https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDBmwschema>
> now
>    affects all database types. Old MediaWiki versions were setting this to
>    'mediawiki' during the installer, which may cause errors during the
> upgrade
>    when your database is not PostgreSQL or MSSQL. In that case, remove this
>    setting from LocalSettings.php.
>
>
> On Fri, Sep 21, 2018 at 9:47 AM Jeff Darlington <[hidden email]
> >
> wrote:
>
> > I only run one wiki, and the database has been "wikidb" since I first
> > installed it years ago.  The definition of $wgDBname appears only once in
> > LocalSettings.php.
> >
> > When I upgrade I always extract the tarball into a pristine new folder,
> > then copy over LocalSettings.php and my one extension. I use symlinks to
> > point to a common external image folder (which has worked better for me
> > than copying the image folder back and forth all the time) and for the
> > site's definition in Apache (i.e., Apache points to the symlink "wiki",
> > which then points to the currently active MediaWiki code base).  When I
> run
> > update.php, I always use the raw path rather than the symlink so I know
> I'm
> > pointing to the right code.
> >
> > My guess is that update.php or some script it depends on isn't honoring
> > $wgDBname.  That said, I can't believe I'm the only person who's using a
> > custom DB name and thus the only person who is having this problem.
> >
> > On Fri, Sep 21, 2018 at 10:35 AM [[kgh]] <[hidden email]>
> wrote:
> >
> > > This may sound stupid, but are you sure that you are mapping the update
> > > script to the correct "LocalSettings.php" file? Perhaps you moved
> around
> > > folders at some time. Another thing may be that you have the parameter
> > > twice in your "LocalSettings.php" file and that one value overrides the
> > > other. Apart from that, I do not know what could be the issue.
> > >
> > > Cheers
> > >
> > > Am 21.09.2018 um 16:28 schrieb Jeff Darlington:
> > > > As I stated several months ago, the updater isn't honoring $wgDBname,
> > > which
> > > > I have explicitly set in LocalSettings.php to "wikidb":
> > > >
> > > > $wgDBname = "wikidb";
> > > >
> > >
> > >
> > > _______________________________________________
> > > MediaWiki-l mailing list
> > > To unsubscribe, go to:
> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> > >
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
That seemed to do the trick.  Removing $wgDBmwschema allowed the update to
proceed. I'm now getting a different error with my extension (which is
unrelated and on my own plate to fix), but at least the core wiki is
working just fine.

Thanks for the input, especially David D., who hit the nail on the head.

--

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/


On Fri, Sep 21, 2018 at 10:55 AM Jeff Darlington <[hidden email]>
wrote:

> Actually, that looks suspiciously familiar, and looking at my
> LocalSettings.php, $wgDBmwschema *is* present.  I never set it; it's a
> default under the "Postgres specific settings" block and has been carried
> over from install to install for years. (I have no idea how old that is; I
> probably first installed MediaWiki back in 2008, maybe?)  I'll try removing
> that and see if that works.
>
> --
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
> On Fri, Sep 21, 2018 at 10:49 AM David Daw <[hidden email]> wrote:
>
>> Hey Jeff,
>>
>> Take a look at this and see if this helps
>> https://www.mediawiki.org/wiki/Topic:Uf63mplrzzuxz0it
>>
>> $wgDBmwschema  may need to be removed from or corrected in
>> LocalSettings.php
>>
>> It's also mentioned here :
>> https://www.mediawiki.org/wiki/MediaWiki_1.31#Configuration_changes
>>
>>
>>    - $wgDBmwschema
>>    <
>> https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDBmwschema>
>> now
>>    affects all database types. Old MediaWiki versions were setting this to
>>    'mediawiki' during the installer, which may cause errors during the
>> upgrade
>>    when your database is not PostgreSQL or MSSQL. In that case, remove
>> this
>>    setting from LocalSettings.php.
>>
>>
>> On Fri, Sep 21, 2018 at 9:47 AM Jeff Darlington <
>> [hidden email]>
>> wrote:
>>
>> > I only run one wiki, and the database has been "wikidb" since I first
>> > installed it years ago.  The definition of $wgDBname appears only once
>> in
>> > LocalSettings.php.
>> >
>> > When I upgrade I always extract the tarball into a pristine new folder,
>> > then copy over LocalSettings.php and my one extension. I use symlinks to
>> > point to a common external image folder (which has worked better for me
>> > than copying the image folder back and forth all the time) and for the
>> > site's definition in Apache (i.e., Apache points to the symlink "wiki",
>> > which then points to the currently active MediaWiki code base).  When I
>> run
>> > update.php, I always use the raw path rather than the symlink so I know
>> I'm
>> > pointing to the right code.
>> >
>> > My guess is that update.php or some script it depends on isn't honoring
>> > $wgDBname.  That said, I can't believe I'm the only person who's using a
>> > custom DB name and thus the only person who is having this problem.
>> >
>> > On Fri, Sep 21, 2018 at 10:35 AM [[kgh]] <[hidden email]>
>> wrote:
>> >
>> > > This may sound stupid, but are you sure that you are mapping the
>> update
>> > > script to the correct "LocalSettings.php" file? Perhaps you moved
>> around
>> > > folders at some time. Another thing may be that you have the parameter
>> > > twice in your "LocalSettings.php" file and that one value overrides
>> the
>> > > other. Apart from that, I do not know what could be the issue.
>> > >
>> > > Cheers
>> > >
>> > > Am 21.09.2018 um 16:28 schrieb Jeff Darlington:
>> > > > As I stated several months ago, the updater isn't honoring
>> $wgDBname,
>> > > which
>> > > > I have explicitly set in LocalSettings.php to "wikidb":
>> > > >
>> > > > $wgDBname = "wikidb";
>> > > >
>> > >
>> > >
>> > > _______________________________________________
>> > > MediaWiki-l mailing list
>> > > To unsubscribe, go to:
>> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> > >
>> > _______________________________________________
>> > MediaWiki-l mailing list
>> > To unsubscribe, go to:
>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> >
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Brian Wolff
Glad to hear its resolved. I think I owe you an apology for not
believing MediaWiki was at fault, where this is something I would
consider a MediaWiki fault.

--
Brian

On Fri, Sep 21, 2018 at 3:04 PM, Jeff Darlington
<[hidden email]> wrote:

> That seemed to do the trick.  Removing $wgDBmwschema allowed the update to
> proceed. I'm now getting a different error with my extension (which is
> unrelated and on my own plate to fix), but at least the core wiki is
> working just fine.
>
> Thanks for the input, especially David D., who hit the nail on the head.
>
> --
>
> Jeffrey T. Darlington
> General Protection Fault
> https://www.gpf-comics.com/
>
>
> On Fri, Sep 21, 2018 at 10:55 AM Jeff Darlington <[hidden email]>
> wrote:
>
>> Actually, that looks suspiciously familiar, and looking at my
>> LocalSettings.php, $wgDBmwschema *is* present.  I never set it; it's a
>> default under the "Postgres specific settings" block and has been carried
>> over from install to install for years. (I have no idea how old that is; I
>> probably first installed MediaWiki back in 2008, maybe?)  I'll try removing
>> that and see if that works.
>>
>> --
>>
>> Jeffrey T. Darlington
>> General Protection Fault
>> https://www.gpf-comics.com/
>>
>>
>> On Fri, Sep 21, 2018 at 10:49 AM David Daw <[hidden email]> wrote:
>>
>>> Hey Jeff,
>>>
>>> Take a look at this and see if this helps
>>> https://www.mediawiki.org/wiki/Topic:Uf63mplrzzuxz0it
>>>
>>> $wgDBmwschema  may need to be removed from or corrected in
>>> LocalSettings.php
>>>
>>> It's also mentioned here :
>>> https://www.mediawiki.org/wiki/MediaWiki_1.31#Configuration_changes
>>>
>>>
>>>    - $wgDBmwschema
>>>    <
>>> https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDBmwschema>
>>> now
>>>    affects all database types. Old MediaWiki versions were setting this to
>>>    'mediawiki' during the installer, which may cause errors during the
>>> upgrade
>>>    when your database is not PostgreSQL or MSSQL. In that case, remove
>>> this
>>>    setting from LocalSettings.php.
>>>
>>>
>>> On Fri, Sep 21, 2018 at 9:47 AM Jeff Darlington <
>>> [hidden email]>
>>> wrote:
>>>
>>> > I only run one wiki, and the database has been "wikidb" since I first
>>> > installed it years ago.  The definition of $wgDBname appears only once
>>> in
>>> > LocalSettings.php.
>>> >
>>> > When I upgrade I always extract the tarball into a pristine new folder,
>>> > then copy over LocalSettings.php and my one extension. I use symlinks to
>>> > point to a common external image folder (which has worked better for me
>>> > than copying the image folder back and forth all the time) and for the
>>> > site's definition in Apache (i.e., Apache points to the symlink "wiki",
>>> > which then points to the currently active MediaWiki code base).  When I
>>> run
>>> > update.php, I always use the raw path rather than the symlink so I know
>>> I'm
>>> > pointing to the right code.
>>> >
>>> > My guess is that update.php or some script it depends on isn't honoring
>>> > $wgDBname.  That said, I can't believe I'm the only person who's using a
>>> > custom DB name and thus the only person who is having this problem.
>>> >
>>> > On Fri, Sep 21, 2018 at 10:35 AM [[kgh]] <[hidden email]>
>>> wrote:
>>> >
>>> > > This may sound stupid, but are you sure that you are mapping the
>>> update
>>> > > script to the correct "LocalSettings.php" file? Perhaps you moved
>>> around
>>> > > folders at some time. Another thing may be that you have the parameter
>>> > > twice in your "LocalSettings.php" file and that one value overrides
>>> the
>>> > > other. Apart from that, I do not know what could be the issue.
>>> > >
>>> > > Cheers
>>> > >
>>> > > Am 21.09.2018 um 16:28 schrieb Jeff Darlington:
>>> > > > As I stated several months ago, the updater isn't honoring
>>> $wgDBname,
>>> > > which
>>> > > > I have explicitly set in LocalSettings.php to "wikidb":
>>> > > >
>>> > > > $wgDBname = "wikidb";
>>> > > >
>>> > >
>>> > >
>>> > > _______________________________________________
>>> > > MediaWiki-l mailing list
>>> > > To unsubscribe, go to:
>>> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>> > >
>>> > _______________________________________________
>>> > MediaWiki-l mailing list
>>> > To unsubscribe, go to:
>>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>> >
>>> _______________________________________________
>>> MediaWiki-l mailing list
>>> To unsubscribe, go to:
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>
>>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MW 1.31.0 fails on maintenance/update.php

Jeff Darlington
No apology necessary. :)  Considering that my install carries with it a
decade of "settings cruft", it's probably a miracle it works at all.  I
will readily admit that I rarely take a look at the release notes unless
something breaks, and even then tracking something like this down through
the sea of changes isn't easy.  I chalk this up to MediaWiki's complexity
and rapid development cycle, as well as perhaps unclear documentation
that's rather hard to sort through.  Just about every other CMS has its
share of pitfalls as well.  (I'm looking at you, WordPress.)

--

Jeffrey T. Darlington
General Protection Fault
https://www.gpf-comics.com/


On Fri, Sep 21, 2018 at 11:20 AM Brian Wolff <[hidden email]> wrote:

> Glad to hear its resolved. I think I owe you an apology for not
> believing MediaWiki was at fault, where this is something I would
> consider a MediaWiki fault.
>
> --
> Brian
>
> On Fri, Sep 21, 2018 at 3:04 PM, Jeff Darlington
> <[hidden email]> wrote:
> > That seemed to do the trick.  Removing $wgDBmwschema allowed the update
> to
> > proceed. I'm now getting a different error with my extension (which is
> > unrelated and on my own plate to fix), but at least the core wiki is
> > working just fine.
> >
> > Thanks for the input, especially David D., who hit the nail on the head.
> >
> > --
> >
> > Jeffrey T. Darlington
> > General Protection Fault
> > https://www.gpf-comics.com/
> >
> >
> > On Fri, Sep 21, 2018 at 10:55 AM Jeff Darlington <
> [hidden email]>
> > wrote:
> >
> >> Actually, that looks suspiciously familiar, and looking at my
> >> LocalSettings.php, $wgDBmwschema *is* present.  I never set it; it's a
> >> default under the "Postgres specific settings" block and has been
> carried
> >> over from install to install for years. (I have no idea how old that
> is; I
> >> probably first installed MediaWiki back in 2008, maybe?)  I'll try
> removing
> >> that and see if that works.
> >>
> >> --
> >>
> >> Jeffrey T. Darlington
> >> General Protection Fault
> >> https://www.gpf-comics.com/
> >>
> >>
> >> On Fri, Sep 21, 2018 at 10:49 AM David Daw <[hidden email]> wrote:
> >>
> >>> Hey Jeff,
> >>>
> >>> Take a look at this and see if this helps
> >>> https://www.mediawiki.org/wiki/Topic:Uf63mplrzzuxz0it
> >>>
> >>> $wgDBmwschema  may need to be removed from or corrected in
> >>> LocalSettings.php
> >>>
> >>> It's also mentioned here :
> >>> https://www.mediawiki.org/wiki/MediaWiki_1.31#Configuration_changes
> >>>
> >>>
> >>>    - $wgDBmwschema
> >>>    <
> >>> https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDBmwschema
> >
> >>> now
> >>>    affects all database types. Old MediaWiki versions were setting
> this to
> >>>    'mediawiki' during the installer, which may cause errors during the
> >>> upgrade
> >>>    when your database is not PostgreSQL or MSSQL. In that case, remove
> >>> this
> >>>    setting from LocalSettings.php.
> >>>
> >>>
> >>> On Fri, Sep 21, 2018 at 9:47 AM Jeff Darlington <
> >>> [hidden email]>
> >>> wrote:
> >>>
> >>> > I only run one wiki, and the database has been "wikidb" since I first
> >>> > installed it years ago.  The definition of $wgDBname appears only
> once
> >>> in
> >>> > LocalSettings.php.
> >>> >
> >>> > When I upgrade I always extract the tarball into a pristine new
> folder,
> >>> > then copy over LocalSettings.php and my one extension. I use
> symlinks to
> >>> > point to a common external image folder (which has worked better for
> me
> >>> > than copying the image folder back and forth all the time) and for
> the
> >>> > site's definition in Apache (i.e., Apache points to the symlink
> "wiki",
> >>> > which then points to the currently active MediaWiki code base).
> When I
> >>> run
> >>> > update.php, I always use the raw path rather than the symlink so I
> know
> >>> I'm
> >>> > pointing to the right code.
> >>> >
> >>> > My guess is that update.php or some script it depends on isn't
> honoring
> >>> > $wgDBname.  That said, I can't believe I'm the only person who's
> using a
> >>> > custom DB name and thus the only person who is having this problem.
> >>> >
> >>> > On Fri, Sep 21, 2018 at 10:35 AM [[kgh]] <[hidden email]>
> >>> wrote:
> >>> >
> >>> > > This may sound stupid, but are you sure that you are mapping the
> >>> update
> >>> > > script to the correct "LocalSettings.php" file? Perhaps you moved
> >>> around
> >>> > > folders at some time. Another thing may be that you have the
> parameter
> >>> > > twice in your "LocalSettings.php" file and that one value overrides
> >>> the
> >>> > > other. Apart from that, I do not know what could be the issue.
> >>> > >
> >>> > > Cheers
> >>> > >
> >>> > > Am 21.09.2018 um 16:28 schrieb Jeff Darlington:
> >>> > > > As I stated several months ago, the updater isn't honoring
> >>> $wgDBname,
> >>> > > which
> >>> > > > I have explicitly set in LocalSettings.php to "wikidb":
> >>> > > >
> >>> > > > $wgDBname = "wikidb";
> >>> > > >
> >>> > >
> >>> > >
> >>> > > _______________________________________________
> >>> > > MediaWiki-l mailing list
> >>> > > To unsubscribe, go to:
> >>> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>> > >
> >>> > _______________________________________________
> >>> > MediaWiki-l mailing list
> >>> > To unsubscribe, go to:
> >>> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>> >
> >>> _______________________________________________
> >>> MediaWiki-l mailing list
> >>> To unsubscribe, go to:
> >>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >>>
> >>
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l