[MediaWiki-l] What is this database error relating to ipb_id?

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

[MediaWiki-l] What is this database error relating to ipb_id?

Jeffrey Walton
I'm trying to perform another 1.30 -> 1.31 upgrade. MariaDB version 5.5.60.

I've tried to run upgrade.php with our standard user (mwuser) and db
administrator (root). upgrade.php has always worked in the past using
our standard user (mwuser).

I've run "mysql_upgrade --user=root ..." again just in case because of
the hint below. Everything is OK.

What is the error and how do I fix it?

###################################

# php maintenance/update.php
MediaWiki 1.31.1 Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for my_wiki-wikicryptopp_
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 ...[33b892a93ece4b42600cbd2b] [no req]   W
ikimedia\Rdbms\DBQueryError from line 1457 of /var/www/html/w/includes/libs/rdbm
s/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`.`wikicryptopp_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/html/w/maintenance/arch
ives/patch-ipblocks.sql )
Error: 1142 ALTER command denied to user 'mwuser'@'localhost' for table 'wikicry
ptopp_ipblocks' (localhost)

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

_______________________________________________
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: What is this database error relating to ipb_id?

Brian Wolff
Ok, it looks like update.php is trying to update the wrong db.

Other people have reported a similar issue due to $wgDBmwschema
suddenly being taken into account by update.php on MySQL where it
wasn't prior to 1.31. If you have $wgDBmwschema set in
LocalSettings.php you should remove it.

Bug report at: https://phabricator.wikimedia.org/T148956 it appears to
be fixed in git, so fix should make it into next point release of
mediawiki.

--
Brian

On Sun, Dec 23, 2018 at 2:44 AM Jeffrey Walton <[hidden email]> wrote:

>
> I'm trying to perform another 1.30 -> 1.31 upgrade. MariaDB version 5.5.60.
>
> I've tried to run upgrade.php with our standard user (mwuser) and db
> administrator (root). upgrade.php has always worked in the past using
> our standard user (mwuser).
>
> I've run "mysql_upgrade --user=root ..." again just in case because of
> the hint below. Everything is OK.
>
> What is the error and how do I fix it?
>
> ###################################
>
> # php maintenance/update.php
> MediaWiki 1.31.1 Updater
>
> Your composer.lock file is up to date with current dependencies!
> Going to run database updates for my_wiki-wikicryptopp_
> 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 ...[33b892a93ece4b42600cbd2b] [no req]   W
> ikimedia\Rdbms\DBQueryError from line 1457 of /var/www/html/w/includes/libs/rdbm
> s/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`.`wikicryptopp_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/html/w/maintenance/arch
> ives/patch-ipblocks.sql )
> Error: 1142 ALTER command denied to user 'mwuser'@'localhost' for table 'wikicry
> ptopp_ipblocks' (localhost)
>
> Backtrace:
> #0 /var/www/html/w/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rd
> bms\Database->makeQueryException(string, integer, string, string)
> #1 /var/www/html/w/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rd
> bms\Database->reportQueryError(string, integer, string, string, boolean)
> #2 /var/www/html/w/includes/libs/rdbms/database/Database.php(4194): Wikimedia\Rd
> bms\Database->query(string, string)
> #3 /var/www/html/w/includes/libs/rdbms/database/Database.php(4129): Wikimedia\Rd
> bms\Database->sourceStream(unknown type, NULL, NULL, string, NULL)
> #4 /var/www/html/w/includes/installer/DatabaseUpdater.php(683): Wikimedia\Rdbms\
> Database->sourceFile(string)
> #5 /var/www/html/w/includes/installer/DatabaseUpdater.php(751): DatabaseUpdater-
> >applyPatch(string, boolean, string)
> #6 /var/www/html/w/includes/installer/DatabaseUpdater.php(482): DatabaseUpdater-
> >addField(string, string, string)
> #7 /var/www/html/w/includes/installer/DatabaseUpdater.php(446): DatabaseUpdater-
> >runUpdates(array, boolean)
> #8 /var/www/html/w/maintenance/update.php(200): DatabaseUpdater->doUpdates(array
> )
> #9 /var/www/html/w/maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()
> #10 /var/www/html/w/maintenance/update.php(245): require_once(string)
> #11 {main}
>
> _______________________________________________
> 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: What is this database error relating to ipb_id?

Jeffrey Walton
On Sat, Dec 22, 2018 at 10:04 PM Brian Wolff <[hidden email]> wrote:

>
> Ok, it looks like update.php is trying to update the wrong db.
>
> Other people have reported a similar issue due to $wgDBmwschema
> suddenly being taken into account by update.php on MySQL where it
> wasn't prior to 1.31. If you have $wgDBmwschema set in
> LocalSettings.php you should remove it.
>
> Bug report at: https://phabricator.wikimedia.org/T148956 it appears to
> be fixed in git, so fix should make it into next point release of
> mediawiki.

Perfect, thank you very much.

Our LocalSettings.php had the hard coded value. (Our installation
dates back to 2006 or 2008, so it has been there a long time).

Jeff

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l